Margin and Markup Calculator
Compare gross margin and markup for two cost and selling-price pairs, such as two suppliers or an old and new price, and see why 40% markup is not 40% margin.
Margin and Markup Calculator
Background.
Two shopkeepers can both say they make 40% on a line and mean different things. Margin measures gross profit as a share of the selling price; markup measures the same profit as a share of the cost. On an item bought for 60 and sold for 100, the profit of 40 is a 40% margin but a 66.67% markup. Mixing the two up is a classic pricing error: a shop that adds 40% to its costs expecting a 40% margin ends up with about 28.6%.
The page takes two cost-and-price pairs side by side, which suits the questions people actually face: two suppliers for the same product, a current price against a proposed one, or two products competing for the same shelf. For the first pair it reports margin and markup; for the second it reports margin only, so compare the pairs on margin.
The comparison can surprise. The default pairs, 60 to 100 and 80 to 120, both earn 40 per unit, yet the second earns it at a 33.33% margin because more of its price is cost. Which is better depends on what limits the business. If the constraint is how many units you can sell, they are equal. If it is the cash needed to buy stock, the first earns the same 40 while tying up 20 less.
Keep each pair in one currency and on one tax basis, both before VAT or sales tax or both after. The figures are gross: returns, discounts, delivery, rent and wages all come out later, so the margin shown is the most the sale can contribute, not what the business keeps.
What is margin and markup calculator?
Gross margin is the fraction of each sale left over after the direct cost of the goods sold: (price − cost) ÷ price, written as a percentage. Markup is the same gross profit divided by the cost instead, (price − cost) ÷ cost, the percentage added on top of what you paid. The two describe one transaction from opposite ends, so either converts into the other, and whenever the price is above cost the margin is the smaller of the two numbers.
How to use this calculator.
- Enter the set 1 cost for one unit: the supplier's price, plus directly attributable costs such as import duty and inbound freight if you want them inside the margin. IAS 2, cited below, counts those in inventory cost.
- Enter the set 1 selling price for that unit, excluding VAT or sales tax if the cost excludes it.
- Fill in set 2 with the alternative you are weighing: another supplier's cost, a proposed new price, or a different product.
- Compare the two margins. Set 1 also shows its markup; for set 2's markup, divide its margin by (100 − margin) and multiply by 100, so a 33.33% margin is a 50% markup.
The formula.
Margin = (price − cost) ÷ price × 100 and markup = (price − cost) ÷ cost × 100, where both figures are for one unit in the same currency. They share a numerator, the gross profit per unit; only the denominator differs. That makes them convertible: markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup), with both written as decimals. A 25% markup is a 20% margin, a 50% markup is 33.33%, and a 100% markup, doubling the cost, is a 50% margin. Margin can approach 100% but never reach it, since that would need a cost of zero; markup has no ceiling. A selling price below cost is accepted and gives negative figures for both, a loss on every unit. Zero or negative costs and prices are refused, because one of the divisions would be undefined or meaningless.
A worked example.
Set 1 is bought for 60 and sold for 100, so the gross profit is 100 − 60 = 40. As a share of the price, 40 ÷ 100 = 0.40, a margin of 40%; as a share of the cost, 40 ÷ 60 = 0.6667, a markup of 66.67%. Set 2 is bought for 80 and sold for 120. Its profit is also 40, but 40 ÷ 120 = 0.3333, so its margin is 33.33%; its markup, which the page does not display, would be 40 ÷ 80 = 50%. Both sets put the same 40 in the till for each unit sold. Set 1 does it on 20 less stock cost, and the higher margin is the signal. To bring set 2 up to a 40% margin, its price would need to be 80 ÷ (1 − 0.40) = 133.33.
Frequently asked questions.
Why doesn't a 40% markup give me a 40% margin?
What selling price gives me a target margin?
Can a margin ever be more than 100%?
Should the selling price include VAT or sales tax?
Is gross margin the same as profit margin?
Why does set 2 show a margin but no markup?
References& sources.
- [1]IFRS Foundation, IAS 2 Inventories.
- [2]OpenStax, Principles of Accounting Volume 1, Merchandising Transactions.
- [3]BIPM, The International System of Units (SI Brochure), 9th ed., version 3.01, coherent derived units and quantity equations.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 3 cited below
- Method
- margin=(price-cost)/price; markup=(price-cost)/cost
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled