Audited 31 Jul 2026·Last updated 28 Oct 2026·3 citations·Tier 3·0 uses

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

Set 1 gross margin
40
Set 1 gross margin: profit per unit as a percentage of the set 1 selling price.
Set 1 markup
66.6667%
Set 2 gross margin
33.3333%
Model scope
Two gross-price scenarios, not accounting or pricing advice; cost and price must share currency, units, tax treatment, and scope, while returns, discounts, overhead, fixed costs, taxes, and net profit are outside it.

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.

  1. 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.
  2. Enter the set 1 selling price for that unit, excluding VAT or sales tax if the cost excludes it.
  3. Fill in set 2 with the alternative you are weighing: another supplier's cost, a proposed new price, or a different product.
  4. 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; markup=(price-cost)/cost

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.

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.

cost Two80
cost One60
price One100
price Two120

Frequently asked questions.

Why doesn't a 40% markup give me a 40% margin?
Because the markup is taken on the cost and the margin is measured on the bigger selling price. Cost 60 plus 40% is a price of 84 and a profit of 24, and 24 ÷ 84 is only 28.57%. The margin is always the smaller percentage whenever you sell above cost.
What selling price gives me a target margin?
Divide the cost by one minus the target margin written as a decimal. For a 30% margin on an item costing 60, the price is 60 ÷ 0.70 = 85.71. Adding 30% to the cost instead would give 78, which is a margin of only about 23%.
Can a margin ever be more than 100%?
No. The profit can never exceed the selling price unless the item cost nothing, so gross margin tops out just below 100%. Markup has no such limit: an item bought for 60 and sold for 150 carries a 150% markup but a 60% margin.
Should the selling price include VAT or sales tax?
Use the same basis on both sides, and for most businesses that means excluding it. Tax collected on a sale is passed on to the government, so leaving it in the price while the cost excludes it counts the tax as profit and inflates the margin.
Is gross margin the same as profit margin?
Not quite. Gross margin only subtracts the direct cost of the goods. Net profit margin also takes off rent, wages, marketing, interest and tax, so it is always lower; a product with a healthy gross margin can still lose money if overheads are high relative to sales.
Why does set 2 show a margin but no markup?
The page reports markup for the first pair only. You can convert set 2's margin yourself: markup = margin ÷ (100 − margin) × 100. In the default example, set 2's 33.33% margin works out to a 50% markup on its cost of 80.

How this page was produced

Published by
Quanta Calculator
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.

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon