Markup vs Margin Calculator
Convert between markup and margin, or find a selling price from cost. Uses the same profit/cost and profit/price formulas as Excel and Google Sheets.
Rates are entered as percents (25 for 25%). Numbers stay in your browser. The default is a cost of 80 and a price of 100, which is a 25% markup and a 20% margin.
Quick answer: markup is profit over cost; margin is profit over selling price. With cost in B2 and price in C2, Excel and Google Sheets use:
=(C2-B2)/B2
=(C2-B2)/C2 Format both as percentages. The first is markup, the second is margin. They are not interchangeable, and using a 25% margin when you meant a 25% markup will under-price the item.
$80 cost, $100 price
Profit is $20. Markup is 20 ÷ 80 = 0.25 (25%). Margin is 20 ÷ 100 = 0.2 (20%). In Google Sheets on 12 November 2026, =(100-80)/80 與 =(100-80)/100 returned those exact figures.
That pair is a useful memory check: a 25% markup is a 20% margin, and the other way around. You do not need a cost to convert the rates:
=0.25/(1+0.25)
=0.2/(1-0.2) Both were confirmed in the same sheet: 25% markup → 20% margin, and 20% margin → 25% markup.
Finding a price from cost
From a markup, multiply. From a margin, divide by one minus the margin. Cost 50 at a 40% markup:
=50*(1+0.4) returned 70. The margin on that sale is (70−50)/70 = 0.2857142857142857, about 28.57%, not 40%. Cost 50 at a 20% margin:
=50/(1-0.2) returned 62.5, and the markup on that price is 25%. I also solved the other direction in the same workbook: price 70 with a 40% markup gives cost 50, and price 62.50 with a 20% margin gives cost 50.
A 100% margin means the entire price is profit, so cost would have to be zero. The formula =B2/(1-C2) then divides by zero. This calculator rejects a margin of 100% or more for the same reason.
Which number people usually mean
Retail and manufacturing often quote markup on cost. Finance and “gross margin” almost always mean profit over sales, which is the margin figure. If a contract or a boss says “20 percent” without saying which, ask. Applying a 20% markup to an $80 cost yields a $96 price; applying a 20% margin to the same cost yields $100.
Neither formula includes discounts, tax, or shipping. If you later cut the $100 price, recompute margin from the price the customer actually pays, not from the list price you started with.
Questions that come up
What is the difference between markup and margin?
Markup is profit divided by cost. Margin is profit divided by selling price. A $20 profit on an $80 cost is a 25% markup and a 20% margin, because the same $20 is 20% of the $100 price.
How do I get price from cost and a margin in Excel or Google Sheets?
If cost is in B2 and the margin (as 20% or 0.2) is in C2, use =B2/(1-C2). From a markup in D2, use =B2*(1+D2).
Can I convert markup to margin without a cost?
Yes. Margin = markup/(1+markup), and markup = margin/(1-margin). 25% markup is 20% margin. A margin of 100% or more has no finite markup, because it would require a cost of zero or less.