How to Calculate Profit Margin: Formula and Worked Examples
Profit margin is profit divided by selling price. A product that costs $40 and sells for $60 has a profit of $20 and a margin of 33.3 percent. The same product has a markup of 50 percent, because markup divides by cost, not price.
Profit margin answers one question: of every dollar of sales, how much do you keep as profit? The formula divides profit by selling price, which is why margin is always smaller than markup on the same product. A product that costs $40 and sells for $60 earns $20, and $20 divided by $60 is 33.3 percent margin. Divide the same $20 by the $40 cost and you get 50 percent markup. Both numbers describe the same $20, and confusing them is the commonest pricing error in small business. This guide works through the formulas, the conversion between margin and markup, and the worked examples that make the difference stick.
Key Takeaways
- Gross margin is (price minus cost) divided by price. On $40 cost and $60 price, margin is 33.3 percent.
- Markup is (price minus cost) divided by cost. On the same numbers, markup is 50 percent.
- Convert either way: margin equals markup divided by (1 plus markup), and markup equals margin divided by (1 minus margin).
Contents
The formula, and why it divides by price
Gross profit margin is revenue minus cost of goods sold, divided by revenue, times 100. For a single product, revenue is the selling price and cost of goods sold is the unit cost, so margin is (price minus cost) divided by price. The denominator is price because the question is about the sales dollar: of each dollar a customer pays, how much survives as profit?
That choice of denominator is the whole difference from markup. Markup divides by cost because its question is different: how much do I add to cost to reach the price? A business that targets a 40 percent margin and prices with a 40 percent markup will underprice, because a 40 percent markup gives a margin of only 28.6 percent. The conversion formulas below exist to prevent exactly that error.
Net margin works the same way at company level, with net income divided by revenue, after all expenses, interest, and tax. Gross margin is the product-level number this calculator works with, and it is the right number for pricing decisions, because pricing controls the gross margin directly.
Worked examples: three products, three margins
Product one costs $40 and sells for $60. Profit is $20, margin is $20 divided by $60, or 33.3 percent, and markup is $20 divided by $40, or 50 percent. Product two costs $12 and sells for $15. Profit is $3, margin is 20 percent, markup is 25 percent. Product three costs $200 and sells for $1,000. Profit is $800, margin is 80 percent, markup is 400 percent.
Notice how the gap between margin and markup grows as margin rises. At a 20 percent margin the markup is 25 percent, a gap of 5 points. At 33.3 percent margin the markup is 50 percent, a gap of 16.7 points. At 80 percent margin the markup is 400 percent, a gap of 320 points. The higher the margin, the more dangerous the confusion, because the two numbers diverge so far.
The calculator solves from any two numbers: give it cost and price, or cost and margin, or price and margin, and it returns the rest. That matters because suppliers quote cost, targets are set in margin, and customers see price: the three numbers live in different conversations, and the calculator translates between them.
Converting between margin and markup
To turn a markup into a margin, divide the markup by one plus the markup. A 50 percent markup gives 0.50 divided by 1.50, or 33.3 percent margin. A 25 percent markup gives 0.25 divided by 1.25, or 20 percent margin. A 100 percent markup, doubling the cost, gives 0.50 margin, or 50 percent: the price is twice cost, so half of every sales dollar is profit.
To turn a margin into a markup, divide the margin by one minus the margin. A 40 percent margin needs 0.40 divided by 0.60, or 66.7 percent markup. A 20 percent margin needs 0.20 divided by 0.80, or 25 percent markup. A margin can never reach 100 percent on a positive price, because profit cannot exceed price, while a markup has no ceiling at all.
The table below puts the pairs side by side for the margins businesses actually target. Keep it near the price list: every time a target is stated in one measure and a price is set in the other, the table is the check.
Margin and markup pairs, side by side
Read across: each row is the same product priced two ways. The profit is identical; only the denominator changes.
| Target margin | Markup needed | Example: cost $100 | Price | Profit |
|---|---|---|---|---|
| 20% | 25.0% | $100 | $125.00 | $25.00 |
| 30% | 42.9% | $100 | $142.86 | $42.86 |
| 33.3% | 50.0% | $100 | $150.00 | $50.00 |
| 40% | 66.7% | $100 | $166.67 | $66.67 |
| 50% | 100.0% | $100 | $200.00 | $100.00 |
What a discount does to your margin
Discounts destroy margin faster than they destroy price, because cost does not fall with the price. A product costing $40 and selling for $60 has a 33.3 percent margin. Discount the price 20 percent to $48 and the profit falls from $20 to $8, so the margin falls to 16.7 percent: a 20 percent price cut halves the margin. Discount 33.3 percent to $40 and the margin is zero.
That asymmetry is why discount approval should be a margin decision, not a price decision. A 10 percent discount on a 20 percent margin product leaves a margin of about 11.1 percent, nearly halved. The same 10 percent discount on an 80 percent margin product leaves about 77.8 percent, barely dented. Low-margin businesses cannot afford casual discounting, and high-margin businesses can.
The calculator shows this live: enter cost and price, apply a discount, and watch margin fall faster than price. Before approving any promotion, run the discounted margin, not just the discounted price, and set a floor margin below which no discount is approved without review.
Margin in a spreadsheet, and five checks
In a spreadsheet, margin is (price minus cost) divided by price. With cost in A2 and price in B2, the formula is =(B2-A2)/B2, formatted as a percentage. Markup is =(B2-A2)/A2. The two formulas differ by one cell reference, which is exactly how the confusion happens in practice: check the denominator every time.
Five checks before publishing a price. One, is the target stated in margin or markup, and does the price use the same measure? Two, does the margin survive the planned discount? Three, are all unit costs included, including shipping, packaging, and payment fees? Four, is the margin on the discounted price still above the floor? Five, does the margin cover overheads, or only the product cost? Gross margin pays for the business only after overheads are covered, so a healthy gross margin with heavy overheads is still a loss.
Frequently Asked Questions
How do I calculate profit margin?
Subtract cost from selling price to get profit, then divide profit by selling price and multiply by 100. A product costing $40 and selling for $60 has a profit of $20 and a margin of 33.3 percent.
What is the difference between margin and markup?
Margin divides profit by selling price; markup divides profit by cost. On $40 cost and $60 price, margin is 33.3 percent and markup is 50 percent. They describe the same $20 profit with different denominators.
How do I convert markup to margin?
Divide markup by one plus markup. A 50 percent markup gives 0.50 divided by 1.50, or 33.3 percent margin. A 100 percent markup gives 50 percent margin.
What is a good profit margin?
It depends on the industry. Grocery retail runs on single-digit margins, while software can exceed 70 percent. Judge a margin against the same industry and against overheads, not against a universal number.
Why does a discount hurt margin more than price?
Because cost does not fall with price. A 20 percent discount on a $60 price with $40 cost cuts profit from $20 to $8, halving a 33.3 percent margin to 16.7 percent.
How do I calculate margin in Excel?
With cost in A2 and price in B2, use =(B2-A2)/B2 formatted as a percentage. Markup is =(B2-A2)/A2. Check the denominator: price for margin, cost for markup.
Enter any two of cost, price, margin, and markup to solve for the rest, and test what a discount does.
Open the Margin CalculatorRelated Calculators
Keep going with the tools readers use next.
- 1Sales Tax Calculator
Add tax on top of your price.
- 2Percentage Calculator
Any percent change, fast.
