Profit margin calculator — margin, markup, and the price that hits your target
Put in a cost and a selling price to see the gross profit, the profit margin and the markup side by side. Or work backwards: name the margin you need and get the price to charge, or the most you can afford to pay for stock. Everything is worked out in this tab — nothing you type is uploaded or saved.
- Nothing is uploaded or saved
- Works offline
What do you know?
You know what it cost and what it sells for. This is the mode that tells you what the margin and the markup actually were.
Profit margin
30%
Both describe the same RM 30.00. The margin measures it against the RM 100.00 you charge; the markup measures it against the RM 70.00 you paid. That is why 42.86% markup and 30% margin are the same deal.
These figures are gross margin arithmetic for planning, not accounting or financial advice. Overheads, wages and tax sit below this line, and your accounts are the numbers that count.
How it works
- 1
Start from whichever two numbers you already have
Three modes, and they are the three ways this question actually turns up. "Cost and price" is the one you use after a sale, to find out what the margin really was. "Cost and target margin" is the one you use before setting a price. "Price and target margin" is the one you use at a supplier meeting, when the shelf price is fixed and the question is how much you can afford to pay.
- 2
Type the figures — commas appear as you go
The money fields group thousands while you type, so 1250 becomes 1,250 and a stray extra zero is visible instead of hiding in a run of digits. Paste straight from a spreadsheet if you like; commas, spaces and currency symbols are ignored. The currency box is a label only, so put RM, $, £ or nothing at all in it.
- 3
Read margin and markup together
They are always shown as a pair, never one alone, because the whole trap in this arithmetic is treating them as interchangeable. The panel also writes the relationship out in words with your own numbers in it — the same profit, measured once against the price and once against the cost.
- 4
Add a quantity to see the order, not just the unit
Leave quantity at 1 and every figure is per unit. Put in the number of units and the panel adds total cost, total revenue and total profit underneath. The percentages do not change — margin is a ratio, so selling a hundred of something at the same price is exactly as profitable per ringgit as selling one.
Margin and markup, converted
The two columns start close together and then pull apart, which is the whole reason they get mixed up. Read the left table when a supplier or a trade quotes you a markup and you need to know what margin it leaves. Read the right table when you have decided on a margin and need the rule to add to cost. On a cost of 100, the price column is what you would charge.
| Markup | Margin | Price on cost 100 |
|---|---|---|
| 10% | 9.09% | 110 |
| 20% | 16.67% | 120 |
| 25% | 20% | 125 |
| 30% | 23.08% | 130 |
| 40% | 28.57% | 140 |
| 50% | 33.33% | 150 |
| 75% | 42.86% | 175 |
| 100% | 50% | 200 |
| 150% | 60% | 250 |
| 200% | 66.67% | 300 |
| 300% | 75% | 400 |
| Margin | Markup | Price on cost 100 |
|---|---|---|
| 5% | 5.26% | 105.26 |
| 10% | 11.11% | 111.11 |
| 15% | 17.65% | 117.65 |
| 20% | 25% | 125 |
| 25% | 33.33% | 133.33 |
| 30% | 42.86% | 142.86 |
| 33.33% | 49.99% | 149.99 |
| 40% | 66.67% | 166.67 |
| 50% | 100% | 200 |
| 60% | 150% | 250 |
| 75% | 300% | 400 |
Notice that the two tables are not mirror images. A 25% markup is a 20% margin, but a 25% margin needs a 33.33% markup — the conversion is not symmetric, and there is no shortcut that works in both directions. That asymmetry is exactly why a rule of thumb learned in one trade goes wrong when it is carried into another.
Frequently asked questions
What is the difference between margin and markup?
They measure the same profit against different bases. Buy something for 100 and sell it for 150: the gross profit is 50 either way. The markup is 50 ÷ 100 = 50%, because markup is the profit as a share of what you PAID. The margin is 50 ÷ 150 = 33.33%, because margin is the profit as a share of what you CHARGED. The margin is always the smaller of the two, and the gap widens as they rise — a 100% markup is a 50% margin, and a 300% markup is a 75% margin. Which one people quote depends on where they stand: retailers and accountants work in margin, because margin is what shows up in the profit-and-loss account and what you compare between products; trades, wholesalers and manufacturers work in markup, because they start from a known cost and need a rule for what to add to it. Both are correct. Confusing them is what costs money.
How do I work out the price for a target margin?
Divide by what is left, do not multiply by what you want. The formula is price = cost ÷ (1 − margin ÷ 100). For a cost of 60 and a target margin of 40%, that is 60 ÷ 0.6 = 100. Sell at 100, keep 40 — a 40% margin, exactly as asked. The intuitive-looking alternative is to add 40% to the cost: 60 × 1.4 = 84. But 84 − 60 = 24, and 24 ÷ 84 is 28.57%, not 40%. That is a 40% MARKUP, and it lands almost twelve points short of the margin that was wanted. This is the single most expensive mistake in the whole topic, it is invisible on any one invoice, and it repeats on every line of a price list.
Why can a margin never reach 100%?
Because margin is measured against the selling price, and the cost is inside that price. To keep 100% of what you charge, the item would have to cost you nothing — and no price is high enough to fix a cost that is above zero, which is why price = cost ÷ (1 − margin ÷ 100) has no answer at 100% and turns negative above it. Markup has no such ceiling: it is measured against the cost, so an item bought at 10 and sold at 1,000 is a 9,900% markup and a 99% margin. If a supplier or a spreadsheet quotes you a "150% margin", it is a markup that has been labelled wrongly. The calculator says so rather than showing infinity.
What counts as a healthy profit margin?
There is no single number, and any site that gives you one is guessing. What a healthy margin looks like is set by three things about your business, not by an average. First, how much of your cost is in the goods themselves: a grocer buys almost everything they sell, so the gross margin is thin and the business runs on volume and turnover, while a consultancy or a software product has almost no cost of goods and so a very high gross margin — which then goes almost entirely on salaries. Second, how fast you turn stock over: a low margin earned twelve times a year beats a high margin earned once. Third, what the gross margin still has to cover — rent, wages, delivery, breakage, payment fees, returns and the stock that never sells. Two shops with identical gross margins can end the year one in profit and one not. The useful comparison is not against an industry figure you read somewhere; it is against the same product last quarter, and against the other products on your own shelf.
Is this gross margin or net margin?
Gross. This calculator looks at one item: what it cost you to buy or make, and what you sold it for. Everything else a business pays — rent, wages, electricity, marketing, delivery, software, card processing fees, tax — sits below that line and belongs to net margin, which is worked out for the whole business over a period, not for a single product. Gross margin is the right tool for pricing decisions and for comparing products against each other. It is the wrong tool for asking whether the business made money, because a healthy gross margin on every item and a net loss at the end of the year are perfectly compatible. A rough sanity check: whatever gross margin you set has to cover all of the overheads and leave something over, on the volume you actually sell.
How much does a discount really cost me?
Far more than the discount looks, because the whole discount comes out of the profit rather than out of the price. Take an item costing 70 and selling at 100: the profit is 30 and the margin is 30%. Take 10% off the price and you sell at 90 — the cost is still 70, so the profit is 20. The price fell by a tenth and the profit fell by a third. To make the same 30 in total profit you now need to sell 1.5 items for every one you sold before, which is a 50% lift in units, not a 10% one. The thinner the margin, the more brutal the arithmetic: at a 15% margin, a 10% discount removes two-thirds of the profit, and at a 10% margin it removes all of it. You can check any of these by putting the discounted price into the first mode of the calculator above — the margin it reports is the one you are actually running.
Should I put in prices with tax included?
Use figures that exclude tax on both sides, and enter them consistently. Sales tax, SST, VAT and GST are collected on behalf of the government and passed on, so they are not yours and they are not profit. Mixing the two is a common and flattering error: if you enter a tax-inclusive selling price against a tax-exclusive cost, the tax you have to hand over gets counted as margin, and the figure comes out high enough to be believed. If your supplier invoices you tax-inclusive and you can reclaim it, strip it out of the cost too. This calculator deliberately has no tax field — one field would have to serve dozens of rates and rules across countries, and a tax box that is wrong for your jurisdiction is worse than no tax box at all.
Is anything I type stored or uploaded?
No. Nothing is uploaded and nothing is saved. The calculator is JavaScript running in this tab, there is no server involved at any point, and the page keeps no local storage for this tool — reload it and the fields are back to their defaults. That is a deliberate choice for this page in particular: the numbers here are your cost base and your supplier terms, which is exactly the kind of thing that should not be left sitting in a browser on a shared machine. The page itself does serve ads, like the rest of this site, which is explained on the privacy page.