Margin Calculator

Calculate gross margin, markup and profit from cost and price — or the price needed for a target margin.

Your result will appear here

Fill in the fields and press Calculate.

Margin and markup both describe the gap between what something costs you and what you sell it for — but they're measured against different bases, and confusing them quietly erodes profit. Margin is the profit as a percentage of the price; markup is the profit as a percentage of the cost.

Enter cost and price to get both, or enter cost and a target margin to get the price you need to charge.

How is it calculated?

Margin vs markup

With profit = revenue − cost:

MeasureFormulaBase
Gross marginprofit ÷ revenue × 100selling price
Markupprofit ÷ cost × 100cost

They are always different for the same sale: a 50% markup is only a 33% margin, and a 50% margin is a 100% markup.

Pricing for a target margin

To hit a desired margin, you can't just add that percentage to the cost — that gives you the markup. The correct price is:

revenue = cost ÷ (1 − margin)

For a 40% margin on a cost of 60, the price is 60 ÷ 0.60 = 100, not 84. This is the mistake that leaves retailers short of their intended margin.

Why the difference matters

Because markup is measured against the smaller number (cost), it always looks bigger than the margin for the same sale. Advertising "50% markup" and expecting a "50% margin" of revenue leaves a real gap. Always state which one you mean.

Where it helps

Retail and e-commerce pricing, wholesale quoting, and quick profitability checks. The tool is currency-neutral — use whatever currency you price in. For a simple sale profit without the percentages, use a profit calculator.

Worked example

You buy an item for 60 and sell it for 100. The profit is 40. The gross margin is 40 ÷ 100 = 40% of the price, while the markup is 40 ÷ 60 ≈ 66.7% of the cost — same sale, two very different percentages. Working the other way, to earn a 40% margin on that 60 cost you must price at 60 ÷ (1 − 0.40) = 100.

FAQ

What is the difference between margin and markup?+

Margin is profit as a percentage of the selling price; markup is profit as a percentage of the cost. For the same sale the markup is always the larger number.

How do I calculate gross margin?+

Subtract cost from revenue to get profit, then divide by revenue and multiply by 100. A 40 profit on a 100 price is a 40% margin.

How do I price for a target margin?+

Divide the cost by (1 − margin as a decimal): revenue = cost ÷ (1 − margin). For a 40% margin on a cost of 60, price at 60 ÷ 0.60 = 100.

Why isn’t a 40% markup the same as a 40% margin?+

Markup is measured against the cost and margin against the price. Since the price is larger, the same profit is a smaller percentage of it — a 40% markup is about a 28.6% margin.

Is this calculator tied to a currency?+

No. Enter cost and price in whatever currency you use; margin and markup are percentages and the profit comes out in the same currency.