Margin Calculator
Margin calculator for pricing. Enter cost and selling price to get profit margin and markup percentage, helping you set prices with confidence.
Margin Calculator
Result will appear here...
Four numbers, whichever door you come in by
Every pricing question is the same four quantities in a ring: cost, revenue, profit, and the percentage that describes the gap. Know cost plus any one of the others and the rest follow.
So this calculator gives you three doors in. Enter your cost, then tell it whether you know the revenue, the profit, or the margin you are targeting. Whichever you pick, it hands back all four: revenue, profit, margin percentage and markup percentage.
That last one is the part worth staying for. Margin and markup are both printed, side by side, every single time. They are not the same number, they are almost never the same number, and getting them mixed up is the most expensive arithmetic mistake in small business. Having both on screen at once is the cheapest way to stop making it.
The dropdown asks what you already know
Start with the dropdown, because it changes which second box appears.
- Use Revenue. You know what you sell it for. Enter cost and revenue, and it works out what you are making.
- Use Profit. You know what you want to earn per unit. Enter cost and profit, and it works out the price that delivers it.
- Use Margin %. You know the margin you need to hit. Enter cost and margin, and it works out the price. This is the pricing mode.
Cost stays visible in all three, because it is the one thing you always have to know.
Press Calculate and you get Revenue, Profit, Margin and Markup regardless of which route you took. Same product, same four facts, just approached from whichever end you happened to be standing at.
The same profit, described two ways
Here is the entire confusion in one example, and it is worth going slowly.
You buy something for 60 and sell it for 100. Your profit is 40. Nobody disagrees about any of that.
Now, what percentage is that profit?
- Margin measures the profit against what you sold it for. 40 out of 100 is 40 percent.
- Markup measures the profit against what you paid for it. 40 out of 60 is 66.67 percent.
Same transaction. Same forty of profit. Two percentages, and they differ by more than half.
The difference is entirely in the denominator. Margin divides by the selling price, markup divides by the cost, and since the selling price is always the larger number, markup is always the larger percentage. Every time, on every product, with no exceptions.
Which one should you use? Both, for different jobs. Margin tells you what share of each sale you keep, so it is the number for judging profitability and comparing against your accounts. Markup tells you how much to add to a cost, so it is the number for actually setting a price on a shop floor. Retail tends to think in markup, finance tends to think in margin, and the two departments have been talking past each other since roughly the invention of retail.
The thirty percent trap
This is the specific way the confusion costs money, and it is worth showing with real numbers.
A business decides it needs a 30 percent margin. Reasonable target. Someone then prices the products by adding 30 percent to cost, because that sounds like the same thing.
It is not the same thing. On an item costing 100:
- Add 30 percent to cost and you get a price of 130. Profit is 30, and 30 out of 130 is a margin of 23.08 percent.
- To actually hit 30 percent margin, the price needs to be 142.86. Profit is 42.86, which is a markup of 42.86 percent.
So the target was missed by nearly seven percentage points, and every unit went out the door 12.86 underpriced. That is 9 percent shaved off the correct price on every single sale.
Sell a thousand of them and you left 12,857 on the table. Not through discounting, not through competition, not through anything you would ever see on a report. Just through dividing by the wrong number.
What makes this one nasty is that it never announces itself. The business looks profitable, the invoices look fine, and the shortfall is invisible unless somebody goes back and checks the margin against the target. This calculator checks it for you, because whichever door you use, both percentages come out together.
Turning one percentage into the other
Two small formulas, and they are worth writing on something near your desk.
Margin from markup: margin = markup ÷ (1 + markup)
Markup from margin: markup = margin ÷ (1 - margin)
Or skip the algebra and read them off:
| If your markup is | your margin is |
|---|---|
| 25% | 20.00% |
| 33.33% | 25.00% |
| 50% | 33.33% |
| 66.67% | 40.00% |
| 100% | 50.00% |
| 200% | 66.67% |
| To get a margin of | mark up cost by |
|---|---|
| 20% | 25.00% |
| 25% | 33.33% |
| 30% | 42.86% |
| 40% | 66.67% |
| 50% | 100.00% |
| 60% | 150.00% |
Notice the one people quote most: doubling your cost, a 100 percent markup, gives you a 50 percent margin. Half of what the customer pays is yours. That is the highest margin most physical goods businesses ever see, and it takes a full doubling to get there.
Notice too that margin can never reach 100 percent while any cost exists, whereas markup has no ceiling at all. A software product costing almost nothing to deliver can carry a markup in the thousands of percent and still only approach, never touch, a 100 percent margin.
One product, all three doors
Take something that costs you 60, and watch the three modes arrive at the same place.
Use Revenue. Cost 60, revenue 100. Profit is 100 minus 60 = 40. Margin is 40 ÷ 100 = 40 percent. Markup is 40 ÷ 60 = 66.67 percent.
Use Profit. Cost 60, profit 40. Revenue is 60 plus 40 = 100. Margin and markup come out at 40 and 66.67 percent.
Use Margin. Cost 60, margin 40 percent. Revenue is 60 ÷ (1 - 0.40) = 100. Profit 40, markup 66.67 percent.
Three different questions, one set of facts. Which is the point: the dropdown is not choosing between three calculations, it is choosing which fact you happen to have in your hand today.
The division in that third mode deserves a second look, because it is the one people try to do in their heads and get wrong. To reach a 40 percent margin you divide the cost by 0.60, you do not multiply it by 1.40. Multiplying by 1.40 gives 84, which is a margin of 28.6 percent and nowhere near the target.
Working backwards from a target
Use Margin is the mode that earns its keep, because pricing almost always starts from a required margin rather than from a price you have already picked.
The margin you need is not a matter of taste. Gross margin has to cover everything that is not cost of goods: rent, wages, marketing, delivery, the shrinkage, the returns, and then whatever is left is actually yours. A business running 20 percent margins and 25 percent overheads is losing money on every sale while its price list looks perfectly sensible.
So the honest sequence is to work out what your overheads consume as a share of revenue, add the profit you want on top, and use that total as the margin you enter here. Then read off the markup the calculator gives you, and hand that number to whoever is pricing the products, because markup is what they can actually apply to a cost.
One practical note on the box itself. Margin takes anything from 0 up to 100. As the target climbs the price climbs faster, because you are dividing by an ever smaller number. Going from a 50 percent target to a 75 percent target does not raise the price by half again, it doubles it, since the markup needed jumps from 100 percent to 300 percent.
What belongs in the cost box
Every number here hangs off the cost figure, so it is worth being careful about what goes in.
For a product, cost means what it took to get the item ready to sell, not just what the invoice from the supplier said. So the purchase price plus freight in, plus import duty, plus packaging, plus any direct handling. Retailers call this the landed cost, and it is frequently a good deal higher than the invoice price, particularly on anything shipped a long way.
For a service, cost means the direct labour and materials that job consumed. The hours actually worked on it, the parts fitted, a subcontractor if you used one.
What stays out is overhead. Rent, utilities, insurance, salaries for people not working directly on the job, marketing. Those are real costs and they still have to be paid, but they get covered out of gross profit rather than being buried in the cost of one item. Put them in the cost box and you are calculating something that is no longer gross margin, and it will not tie to your accounts.
The tax authorities take the same view, which is a useful sanity check. The IRS small business guide treats gross profit as the figure left after cost of goods sold, and suggests comparing your gross profit percentage against your usual markup percentage as a way of catching errors in your sales, purchase or inventory numbers. That comparison only works if both are measuring what they claim to.
Questions people ask
What is the difference between margin and markup?
The denominator. Margin divides profit by the selling price, markup divides profit by the cost. On an item bought for 60 and sold for 100, the margin is 40 percent and the markup is 66.67 percent, from the same 40 of profit.
Which is always the bigger number?
Markup, on any product sold above cost, because it divides by the smaller of the two figures. If someone quotes you a percentage and it sounds surprisingly good, check which one they mean.
How do I price for a target margin?
Divide the cost by one minus the margin as a decimal. For a 30 percent margin on a cost of 100 that is 100 divided by 0.70, giving 142.86. Do not add 30 percent to the cost, which gives 130 and a margin of only 23.08 percent.
How do I convert markup to margin?
Margin equals markup divided by one plus markup. A 50 percent markup is a 33.33 percent margin. Going the other way, markup equals margin divided by one minus margin.
Can margin be 100 percent?
Not while the item costs you anything at all. Margin approaches 100 percent as cost approaches zero but never arrives. Markup has no upper limit.
Should rent and salaries go in the cost box?
No. Cost here means cost of goods sold, the direct cost of the item or job. Overheads are paid out of the gross profit this calculates. Including them gives you a different figure that will not match your accounts.
What is a good margin?
It depends entirely on the industry, and the only test that matters is whether the gross margin covers your overheads with something left over. Retail typically runs lower margins on higher volume, services typically run higher margins on lower volume.
Which mode should I use?
Use Revenue to check what an existing price is earning you. Use Margin to set a new price from a target. Use Profit when you have a fixed amount you need to make per unit. All three produce the same four numbers.
References
Gross profit is defined here as revenue less cost of goods sold, following the Internal Revenue Service's guidance for small business, which also recommends comparing the gross profit percentage against the usual markup percentage as a check on sales, purchase and inventory figures. The treatment of markup as a percentage of cost, and of gross margin as a percentage of revenue, follows guidance published by the US Chamber of Commerce and the Corporate Finance Institute. The point that markup percentage in retail inventory accounting is measured against retail value rather than cost comes from IRS Publication 538.
- Internal Revenue Service, Publication 334: Tax Guide for Small Business. https://www.irs.gov/publications/p334
- Internal Revenue Service, Publication 538: Accounting Periods and Methods. https://www.irs.gov/publications/p538
- US Chamber of Commerce, Pricing Markups Explained: Definition and Similar Terms. https://www.uschamber.com/co/start/strategy/what-are-pricing-markups
- Corporate Finance Institute, Markup: How to Calculate Markup and Markup Percentage. https://corporatefinanceinstitute.com/resources/accounting/markup/
Olga Chernova is an equity research analyst and final year Economics and Finance student at the American University in Bulgaria, with hands on experience in valuation and financial modeling. She has passed CFA Level I and contributed to a 2nd place team in the 2025-2026 CFA Institute Research Challenge in Bulgaria. At Eon Tools, she reviews finance tools.
Other Tools
- Accounting Profit Calculator
- Acid Test Ratio Calculator
- Average Collection Period Calculator
- Break Even Calculator
- Capital Employed Calculator
- Cash Conversion Cycle Calculator
- Cash Flow Margin Calculator
- Cash Ratio Calculator
- Contribution Margin Calculator
- Current Ratio Calculator
- Debt To Asset Ratio Calculator
- Debt To Equity Ratio Calculator
- Debtor Days Calculator
- Degree Of Operating Leverage Calculator
- DPO Calculator
- DSCR Calculator
- EBIT Calculator
- EBITDA Calculator
- EBITDA Margin Calculator
- EBITDA Multiple Calculator
- EBIT Margin Calculator
- Ending Inventory Calculator
- Equity Multiplier Calculator
- Equity Ratio Calculator
- Fixed Asset Turnover Calculator
- Fixed Charge Coverage Ratio Calculator
- Goodwill Calculator
- Goodwill To Assets Ratio Calculator
- Gross Profit Margin Calculator
- Interest Coverage Ratio Calculator
- Inventory Period Calculator
- Inventory Turnover Calculator
- Net Debt Calculator
- Net Income Calculator
- Net Profit Margin Calculator
- NOPAT Calculator
- Operating Margin Calculator
- Operating Profit Percentage Calculator
- Profit Calculator
- Profit To Sales Ratio Calculator
- Quick Ratio Calculator
- Receivables Turnover Ratio Calculator
- Return On Assets Ratio Calculator
- Return On Equity Calculator
- Return On Net Assets Calculator
- Return On Sales Calculator
- Residual Income Calculator
- Revenue Calculator
- ROCE Calculator
- Sustainable Growth Rate Calculator
- Times Interest Earned Ratio Calculator
- Total Asset Turnover Calculator
- Weighted Average Cost Of Capital (WACC) Calculator