Margin and markup are easy to confuse — and the difference costs real money. Margin is profit as a percent of the selling price; markup is profit as a percent of the cost. Same dollars, different denominators.
The example
Cost $25, price $40 — the same $15 profit, two percentages.
| A | B | |
|---|---|---|
| 1 | Measure | Value |
| 2 | Cost | $25 |
| 3 | Price | $40 |
| 4 | Margin (÷ price) | 37.5% |
| 5 | Markup (÷ cost) | 60% |
The formula
Margin and markup from the same cost and price:
How it works
Same profit, different base:
- The profit is
price − cost=$40 − $25 = $15either way. - Margin divides that by the price:
15/40 = 37.5%— the share of revenue you keep. - Markup divides it by the cost:
15/25 = 60%— how much you added on top of cost. - Markup is always the larger number. Quoting a “60% markup” as if it were margin overstates profitability badly.
Price from a target margin: to hit a 40% margin, divide cost by (1 − margin): =B1 / (1 - 0.4). To apply a markup instead, multiply: =B1 * (1 + 0.6). Mixing these up is the classic pricing error.
Try it: interactive demo
Set cost and price; compare margin and markup.
Variations
Price for a target margin
Divide cost by (1 - margin):
Price from a markup
Multiply cost by (1 + markup):
Convert markup to margin
The relationship:
Pitfalls & errors
Don’t confuse the two. Margin divides by price, markup by cost. Treating a markup as a margin overstates profit and underprices your product.
Divide-by-zero. A zero price (margin) or zero cost (markup) errors. Guard with IFERROR if inputs can be blank.
Pricing direction. For a target margin, divide cost by (1−margin) — not multiply. Multiplying applies a markup, which yields a smaller margin than intended.
Practice workbook
Frequently asked questions
What's the difference between margin and markup in Excel?
How do I price an item for a target margin?
How do I convert markup to margin?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class