Examples · Money · updated 2026-09-26

Margin and markup — how they differ and how to calculate each

Margin and markup are both calculated from a cost and a selling price. Both start from the same gross profit (price − cost), but divide it by something different: margin by the selling price, markup by the cost. With a cost of 80 and a price of 100, the gross profit is 20, the margin is 20% and the markup 25%.

Board 1

Open in CalcAnyway ↗

You can change the numbers here too, but changes made in this frame are not saved. To keep them, open it in CalcAnyway and edit there.

The left column is the cost, the gross profit and the selling price, top to bottom. The gross profit is the price minus the cost. Of the two cards on the right, the upper one is the markup and the lower one the margin; both are worked out from the gross profit in the middle of the left column.

Changing the cost or the price updates the gross profit and both percentages. The example uses nothing but a cost and a price, to keep the comparison clean.

The same profit, divided by the price or by the cost

The gross profit here is 100 − 80 = 20. Up to this point, both percentages agree.

margin (%) = gross profit ÷ selling price × 100

Margin says what share of the selling price is profit. The price of 100 counts as 100%, so 20 ÷ 100 gives 20%. It is also called the gross margin or gross profit margin.

markup (%) = gross profit ÷ cost × 100

Markup says how much was added on top of the cost. The cost of 80 counts as 100%, so 20 ÷ 80 gives 25%.

The same profit of 20 is divided by 100 in one case and by 80 in the other, hence 20% and 25%. Both are correct; they measure against different amounts. As long as the price is above the cost, the markup, with its smaller divisor, is always the larger of the two.

The percentages depend on the ratio of cost to price, not on the size of the amounts. With the cost on Board 1 set to 800 and the price to 1,000, the gross profit becomes 200, and the margin and markup stay at 20.0% and 25.0%.

The gross profit is part of the price, so as long as the cost is above 0, the margin never reaches 100%. Markup has no such ceiling. With a cost of 80 and a price of 160, the margin is 50.0% and the markup 100.0%. Selling at twice the cost is exactly a 100% markup.

Setting a price from a target — the same 20% gives different prices

The calculation also works the other way: from a percentage decided first, it gives the price. Board 2 starts from a cost of 80 and works out one price from a target margin and another from a target markup. Both targets are set to 20%.

Board 2

Open in CalcAnyway ↗

You can change the numbers here too, but changes made in this frame are not saved. To keep them, open it in CalcAnyway and edit there.

The left column is the target margin, the cost and the target markup, top to bottom. Top right is the price for the target margin, bottom right the price for the target markup. The targets are sliders.

A 20% markup means adding 20% to the cost. The price is 80 × (1 + 0.2) = 96.

price from a markup = cost × (1 + markup ÷ 100)

A 20% margin means 20% of the selling price is profit. The other 80% of the price is the cost, so the price is the amount of which 80 is 80%: 80 ÷ 0.8 = 100.

price from a margin = cost ÷ (1 − margin ÷ 100)

The margin version is a division because the base it is measured against, the price, is not known yet. The 20% is a share of a price still to be decided, so adding 20% to the cost does not produce a 20% margin.

At a price of 96, the cost plus 20%, the gross profit is 16. As a share of the price that is 16 ÷ 96, about 16.7%. With the price on Board 1 set to 96, it shows a 16.7% margin and a 20.0% markup.

Same "20%": a 20% margin means a price of 100, a 20% markup a price of 96. When someone says "a 20% profit", which of the two they mean changes the price.

Converting between margin and markup

The two percentages are linked in the same way whatever the cost is. Board 3 turns a margin into a markup, and a markup into a margin.

Board 3

Open in CalcAnyway ↗

You can change the numbers here too, but changes made in this frame are not saved. To keep them, open it in CalcAnyway and edit there.

The top row turns a 20% margin into a markup: 25.0%. The bottom row turns a 25% markup into a margin: 20.0%.

The formula follows from taking the price as 100. With a 20% margin, the profit is 20 and the cost is 100 − 20 = 80. The markup is 20 ÷ 80, which is 25%.

markup = margin ÷ (100 − margin) × 100

For the other direction, the cost is taken as 100. With a 25% markup, the profit is 25 and the price is 100 + 25 = 125. The margin is 25 ÷ 125, which is 20%.

margin = markup ÷ (100 + markup) × 100

Changing the margin in the top row of Board 3:

Margin as a markup (measured on the board)
Margin Markup
10%11.1%
20%25.0%
30%42.9%
40%66.7%
50%100.0%
60%150.0%
75%300.0%
90%900.0%

At a 10% margin the two hardly differ. At a 50% margin the markup is 100%, twice as much. As the margin approaches 100%, the (100 − margin) in the formula approaches 0, so the markup rises steeply.

Other numbers

On Board 1, keeping the cost at 80 and changing the price:

Cost 80 (measured on the board)
Price Gross profit Margin Markup
961616.7%20.0%
1002020.0%25.0%
1204033.3%50.0%
1608050.0%100.0%

The higher the price, the further apart the two percentages get: 5 points apart at a price of 100, 50 points apart at 160.

Next, on Board 2, with the target margin and the target markup set to the same number:

Pricing from a cost of 80 (measured on the board)
Target Price for target margin Price for target markup
0%80.080.0
20%100.096.0
25%106.7100.0
30%114.3104.0
50%160.0120.0

At 0% both prices are the cost, 80. The higher the target, the further the margin-based price pulls ahead.

With the target margin on Board 2 left at 20% and only the target markup set to 25%, both prices become 100.0. A 20% margin and a 25% markup are the same price, measured against different bases.

What this calculation does not cover

Gross profit is only the price minus the cost. Wages, rent, advertising and other running costs have not come out of it yet. A high margin can still leave nothing once those are paid.

What counts as cost also changes the percentages. Counting only the purchase price, or also the shipping and packaging, gives different gross profits.

So does mixing prices with and without sales tax or VAT. On Board 1, with the cost at 80, entering the price as 110 including a 10% tax shows a 27.3% margin and a 37.5% markup.

Read next — Percentage change — the new value, and the rise needed to get back It calculates a value after a percentage change and the rise needed to return to the start; a 20% fall needs a 25% rise, the same pair of numbers as a 20% margin and a 25% markup.


More money examples →