Margin Calculator

Find your gross profit margin in seconds. Enter the cost and selling price to see the margin, markup, and profit — and add a target margin to get the price you'd need to charge.

Gross margin 0%
Gross profit $0
Markup 0%
Price for target margin

How to calculate margin

Gross profit margin measures how much of each sale you keep after covering the cost of the item. Subtract cost from price to get profit, then divide by the price:

Margin % = (Price − Cost) ÷ Price × 100

An item that costs $40 and sells for $50 makes $10 of profit on a $50 sale — a 20% margin. The same $10 profit measured against the $40 cost is a 25% markup, which is why margin and markup are never the same number.

Margin vs. markup

Markup is always larger than margin for the same item. Pricing off markup when you meant margin quietly leaves money on the table, so it pays to know which one you're working with. To work the other direction, see the markup calculator.

Pricing for a target margin

To hit a specific margin, don't just add the percentage to your cost — that gives a markup, not a margin. Divide the cost by one minus the target margin:

Price = Cost ÷ (1 − Target margin)

For a 40% margin on a $40 item: $40 ÷ (1 − 0.40) = $40 ÷ 0.60 = $66.67. Enter a target margin above to see this price instantly.

Frequently asked questions

How do you calculate profit margin?

Gross profit margin is your profit as a percentage of the selling price. Subtract the cost from the price to get the profit, divide that by the price, and multiply by 100. For example, an item that costs $40 and sells for $50 has a $10 profit on a $50 price, which is a 20% margin.

What is the difference between margin and markup?

They use the same profit but a different base. Margin is profit divided by the selling price, while markup is profit divided by the cost. A $10 profit on a $40 cost item sold for $50 is a 20% margin but a 25% markup. Markup is always the larger number, which is why confusing the two leads to underpricing.

What is a good profit margin?

It varies widely by industry. Retail and grocery often run on thin margins of a few percent, while software and luxury goods can exceed 70%. As a rough guide, a net margin around 10% is considered average and 20% or more is healthy — but compare against businesses like yours rather than a universal number.

How do I price an item for a target margin?

Divide the cost by one minus the target margin (as a decimal). To earn a 40% margin on an item that costs $40, divide $40 by 0.60, which gives a selling price of $66.67. Enter a target margin in the calculator to get this price automatically.

Is this gross margin or net margin?

This calculator finds gross margin, which compares the selling price to the direct cost of the product. Net margin goes further and subtracts all other expenses — overhead, marketing, taxes, and interest — from your profit. Net margin is always lower than gross margin.

Disclaimer: This calculator finds gross margin from a single cost and price. It does not account for overhead, taxes, shipping, or other operating expenses. It is for educational purposes only and is not financial advice.