This margin calculator answers the two questions every seller faces: what margin am I earning at my current price, and what price do I need to hit a target margin? Enter cost and revenue to see gross margin, markup, and profit — or flip the mode, enter cost and a desired margin, and get the exact selling price.
Margin is the share of each sales dollar you keep after covering the cost of goods sold. It is the language of pricing, retail buying, and financial statements, and confusing it with markup is one of the most expensive small-business math mistakes.
The Margin and Markup Formulas
All four numbers come from cost (C) and revenue (R):
- Gross profit = R − C
- Gross margin % = (R − C) ÷ R × 100 — profit as a share of the selling price
- Markup % = (R − C) ÷ C × 100 — profit as a share of the cost
- Selling price for a target margin = C ÷ (1 − margin ÷ 100)
The last formula is the one people get wrong. To earn a 40% margin on a $50 cost, the price is $50 ÷ 0.60 = $83.33 — not $50 × 1.40 = $70. Multiplying by 1.40 applies a 40% markup, which is only a 28.6% margin. For the same percentage, margin always produces a higher price than markup.
Margin vs Markup: Conversion Table
Because margin divides by revenue and markup divides by cost, the same profit produces two different percentages. Common equivalents:
- 10% margin = 11.1% markup
- 20% margin = 25% markup
- 25% margin = 33.3% markup
- 30% margin = 42.9% markup
- 40% margin = 66.7% markup
- 50% margin = 100% markup (selling at double the cost)
- 75% margin = 300% markup
Convert between them with: markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup), using decimals. Note that margin can never reach 100%, while markup is unlimited — a useful sanity check when a quoted number seems off.
Example: Pricing a Product That Costs $50
Suppose a product costs you $50 in materials and manufacturing, and you currently sell it for $80.
- Gross profit: $80 − $50 = $30
- Gross margin: $30 ÷ $80 = 37.5%
- Markup: $30 ÷ $50 = 60%
Now your business plan calls for a 45% gross margin. The required price is $50 ÷ (1 − 0.45) = $90.91. Had you mistakenly applied a 45% markup instead, the price would be $72.50 — which is only a 31% margin, quietly underpricing the product by $18.41 on every unit sold.
Frequently Asked Questions
What is the difference between margin and markup?
Margin measures profit as a percentage of the selling price; markup measures it as a percentage of cost. A $30 profit on an $80 sale is a 37.5% margin but a 60% markup on the $50 cost. Margin is always the smaller number for the same sale.
How do I calculate selling price from a desired margin?
Divide the cost by 1 minus the margin as a decimal: price = cost ÷ (1 − margin). For a 40% margin on a $50 cost, price = $50 ÷ 0.60 = $83.33. Multiplying cost by (1 + margin) is wrong — that yields a markup, not a margin.
What is a good profit margin?
It depends heavily on industry. Grocery stores often run gross margins near 25% with net margins of 1–3%, restaurants typically see 60–70% gross but 3–9% net, and software companies commonly exceed 80% gross margin. Compare against your own industry’s benchmarks rather than a universal number.
What is gross margin vs net margin?
Gross margin only subtracts the cost of goods sold from revenue. Net margin subtracts everything — COGS plus rent, payroll, marketing, interest, and taxes. A business can have a healthy 50% gross margin and still lose money if operating expenses exceed the gross profit.
Can a margin be more than 100%?
No. Margin is profit divided by revenue, so it can only approach 100% as cost approaches zero. Markup, however, has no ceiling — selling a $10 item for $50 is a 400% markup but an 80% margin. If someone quotes a margin above 100%, they mean markup.