CalcHub

Margin Calculator — Gross Margin & Markup in One

Calculate gross margin and markup from cost and price — or price from cost and target margin. The difference explained with real math.

Gross profit per unit
$20.00
Margin (of price)
33.3%
Markup (of cost)
50.0%
Price for 40% margin
$66.67
cost ÷ (1 − 40%)

Last reviewed 2026-10-18. Rates change — verify against the official sources linked below before relying on these figures.

What this is based on

  • Margin = profit ÷ sale price; markup = profit ÷ cost. Same profit, different denominators — margin is always the smaller number.
  • Unit economics only — overheads, taxes and discounts are excluded.

Margin vs markup — the confusion that costs businesses

A product costing $40 sold at $60 has a $20 profit — that's 33.3% margin (of the $60 price) but 50% markup (on the $40 cost). Same dollars, wildly different percentages. Quoting one when the conversation expects the other is how pricing meetings produce wrong decisions.

The classic disaster: a retailer wants '40% margin' and applies a 40% markup — price becomes $56 instead of $66.67, a real margin of 28.6%, and the difference evaporates silently across every sale.

The formula that sets prices correctly

To hit a target margin, divide cost by (1 − margin): $40 ÷ (1 − 0.40) = $66.67. Memorize the inverse pairs — a 50% margin needs a 100% markup, a 33% margin needs 50% markup, a 25% margin needs 33% markup. If you think in markups, you're always underpricing.

What margin tells you — and what it doesn't

Margin is what the market sees (your income statement shows it); markup is the internal pricing tool. Neither includes overheads — a 40% gross margin with 35% overhead is a 5% business. Use margin for investor/accounting talk, markup when setting prices, and never confuse them in the same spreadsheet.

Frequently asked questions

How do you calculate margin?
Margin % = (price − cost) ÷ price × 100. It measures profit as a share of the sale price.
What is a 30% margin in dollars?
Depends on the price: margin is relative. On a $60 sale it means $18 profit — cost was $42.
How do I price for a 40% margin?
Price = cost ÷ 0.6. A $40 cost needs a $66.67 price — a 66.7% markup, not 40%.
Is margin or markup bigger?
Markup is always larger for the same profit — it divides by the smaller number (cost). 50% markup = 33% margin; 100% markup = 50% margin.

Related calculators