Markup vs Margin Calculator
Cost and selling price in: the markup and the margin side by side, with the working.
The calculator never sends or saves what you type.
Profit % from CP and SP? In Indian school maths it is the markup, and loss % too.
On this page

Markup vs margin: one profit, two bases
Markup and margin describe the same profit — the selling price minus the cost — as a percentage of two different numbers. Markup divides the profit by the cost; margin divides it by the selling price. Buyers and suppliers usually talk in markup, because it is how you get from a cost to a price. Accounts and investors talk in margin, because it says how much of every sale you keep.
A product costs $100 and sells for $150.
- Profit: $150 − $100 = $50
- Markup: $50 ÷ $100 × 100 = 50%
- Margin: $50 ÷ $150 × 100 = 33.33%
- Check: $100 + 50% = $150 ✓
With a profit, the margin is always the smaller figure, because it divides the same profit by a bigger number. Sell below cost and both turn negative: $90 on a $120 cost is a −25% markup and a −33.33% margin. The calculator above says so in words, too.
Convert markup to margin, and margin to markup
You do not need the cost or the price to convert one to the other — only the percentage. Work in decimals (25% is 0.25):
- margin = markup ÷ (1 + markup)
- markup = margin ÷ (1 − margin)
A 25% markup is 0.25 ÷ 1.25 = a 20% margin; a 20% margin is 0.20 ÷ 0.80 = a 25% markup. The second formula breaks at a 100% margin, which is the formula's way of saying that margin cannot get there.
| Markup | Margin |
|---|---|
| 10% | 9.09% |
| 20% | 16.67% |
| 25% | 20% |
| 30% | 23.08% |
| 40% | 28.57% |
| 50% | 33.33% |
| 60% | 37.5% |
| 75% | 42.86% |
| 100% | 50% |
| 150% | 60% |
| 200% | 66.67% |
| 300% | 75% |
Price from cost and a target margin
Setting a price to hit a margin is a reverse percentage: the margin is a share of a price you have not worked out yet, so you divide rather than multiply — price = cost ÷ (1 − margin). It is the same move as taking VAT out of a gross price.
A $70 cost, priced for a 30% margin.
- The cost is what is left of the price after the margin: 1 − 0.30 = 0.70
- Price: $70 ÷ 0.70 = $100
- Check: profit $100 − $70 = $30, and $30 ÷ $100 = 30% ✓
The tempting shortcut, $70 × 1.30 = $91, is a 30% markup. Its margin is $21 ÷ $91 = 23.08% — seven points short of the target, on every sale. The table prices a $100 cost for common margins:
| Target margin | Markup needed | Price on $100 |
|---|---|---|
| 10% | 11.11% | $111.11 |
| 15% | 17.65% | $117.65 |
| 20% | 25% | $125.00 |
| 25% | 33.33% | $133.33 |
| 30% | 42.86% | $142.86 |
| 40% | 66.67% | $166.67 |
| 50% | 100% | $200.00 |
| 60% | 150% | $250.00 |
| 75% | 300% | $400.00 |
The same division, step by step and for any percentage, is in how to do reverse percentages.
Markup and margin in Excel
With the cost in A2 and the selling price in B2, format the result cells as percentages:
| To get | Formula |
|---|---|
| Markup | =(B2-A2)/A2 |
| Margin | =(B2-A2)/B2 |
| Markup → margin (markup in C2) | =C2/(1+C2) |
| Margin → markup (margin in C2) | =C2/(1-C2) |
| Price for a margin in C2 | =A2/(1-C2) |
Guard the margin with =IF(B2=0,"",(B2-A2)/B2) so a blank price does not fill the column with #DIV/0!. More on the division that trips spreadsheets up: reverse percentages in Excel.
Zero costs, zero prices and losses
A cost of 0 gives a 100% margin — all of the price is profit — but no markup at all, because markup divides by the cost. A selling price of 0 has no margin for the same reason the other way round. And a price below the cost is a real answer, not an error: both percentages come out negative, and the calculator labels it as a loss rather than showing a minus sign under a profit heading. For a change between two prices over time rather than a cost and a price, use the percentage change calculator.
Profit percentage calculator: profit and loss % from CP and SP
In Indian school maths, profit % (also called gain %) = profit ÷ cost price × 100. That is this calculator’s markup, not its margin.
Put the CP (cost price) in Cost and the SP (selling price) in Selling price — with or without the ₹, Rs or /- — then read the markup. Loss % = loss ÷ CP × 100. The calculator shows a loss as a negative markup under “Markup — sold at a loss”, so drop the minus sign. Use the margin only when a question says the percentage is on the selling price.
Profit % and loss %, worked in rupees
Bought for ₹800, sold for ₹1,000.
- Profit = 1,000 − 800 = ₹200
- Profit % = 200 ÷ 800 × 100 = 25%
- Margin = 200 ÷ 1,000 × 100 = 20%, which is the wrong answer to a textbook question.
Bought for ₹1,200, sold for ₹900.
- Loss = 1,200 − 900 = ₹300
- Loss % = 300 ÷ 1,200 × 100 = 25% (the calculator: markup −25%)
Selling price from a profit %: SP = CP × (100 + profit %) ÷ 100, so ₹450 at 20% profit sells for 450 × 120 ÷ 100 = ₹540. For a loss, use (100 − loss %). The cost price from the selling price is a division, CP = SP × 100 ÷ (100 + profit %), so ₹540 at 20% profit cost ₹450. The value before a percentage increase calculator does that division with the working shown. For a loss it is CP = SP × 100 ÷ (100 − loss %), so ₹540 at a 10% loss cost ₹600: the original price calculator does that one, with the loss % as the discount (set its currency to “—” for plain numbers).
To check a selling price you worked out, type the CP and your SP into the calculator above: the markup it shows is your profit %. ₹450 and ₹540 give 20%.
The calculator reads ₹450, Rs 450 and 450/- as 450, and shows plain numbers with no ₹ sign; the rupee figures here are the worked examples.
Frequently asked questions
What is the difference between markup and margin?
Both measure the same profit — selling price minus cost — against a different base. Markup divides the profit by the cost; margin divides it by the selling price. An item that costs $100 and sells for $150 makes $50 profit: a 50% markup ($50 ÷ $100) and a 33.33% margin ($50 ÷ $150). Because the price is always bigger than the cost when you make a profit, the margin is always the smaller of the two.
How do I convert markup to margin?
Divide the markup by 1 plus the markup, using decimals: margin = markup ÷ (1 + markup). A 25% markup is 0.25 ÷ 1.25 = 0.20, a 20% margin. Going the other way, markup = margin ÷ (1 − margin): a 20% margin is 0.20 ÷ 0.80 = 0.25, a 25% markup.
Is a 50% markup the same as a 50% margin?
No. A 50% markup is a 33.33% margin: on a $100 cost the price is $150, and $50 ÷ $150 = 33.33%. A 50% margin needs a 100% markup — the price has to be double the cost, $200, so that the $100 profit is half of it. Mixing the two up is the most common pricing mistake: quoting a 50% "margin" when you applied a 50% markup leaves you a third short of the profit you planned.
Why can markup go above 100% but margin never reach it?
Margin is profit as a share of the price, and the profit is the price minus the cost, so the profit can only equal the whole price if the cost is zero. Any real cost keeps the margin below 100%. Markup divides by the cost instead, and nothing stops the price being many times the cost: selling a $10 item for $40 is a 300% markup and a 75% margin.
What markup gives a 30% margin?
A 42.86% markup. Use markup = margin ÷ (1 − margin): 0.30 ÷ 0.70 = 0.4286. On a $70 cost that is a $100 price — $30 profit, which is 30% of $100. A 30% markup would give only a 23.08% margin.
How do I find the selling price from the cost and a target margin?
Divide the cost by 1 minus the margin: price = cost ÷ (1 − margin). For a 30% margin on a $70 cost, 70 ÷ 0.70 = $100. Do not multiply the cost by 1.30 — that is a 30% markup, it gives $91, and $21 ÷ $91 is only a 23.08% margin. It is a reverse percentage: the margin is a share of the price you have not worked out yet.
How do I calculate profit percentage?
Divide the profit by the cost price and multiply by 100: profit % (also called gain %) = (SP − CP) ÷ CP × 100. Bought for ₹800 and sold for ₹1,000, the profit is ₹200 and the profit percentage is 200 ÷ 800 × 100 = 25%. That is the markup in the calculator above. Dividing by the selling price instead gives the margin, 20%, which answers a different question.
How do I calculate loss percentage?
Divide the loss by the cost price and multiply by 100: loss % = (CP − SP) ÷ CP × 100. Bought for ₹1,200 and sold for ₹900, the loss is ₹300 and the loss percentage is 300 ÷ 1,200 × 100 = 25%. The calculator above shows it as a markup of −25%; the minus sign means a loss.