Margin Calculator

Calculate gross profit margin, markup, revenue, or cost. Solve for any variable given the others.

Solve for:
$
$

A shop buys an item for 60 and wants a 40% margin. Someone adds 40% to the cost and prices it at 84. The margin on that sale is 28.57%, not 40%, and across 500 units the gap is 8,000 in profit that never arrives. Margin is profit divided by the selling price. Markup is profit divided by the cost. They describe the same sale from two ends and are never equal unless profit is zero. This page has four tabs so you can start from whichever pair of numbers you hold, and it prints margin and markup together so you can see both.

Margin and markup, side by side

Gross profit = revenue - cost. Gross margin = profit / revenue x 100. Markup = profit / cost x 100. Cost ratio = cost / revenue x 100, so margin plus cost ratio always equals 100%. Turning one into the other: margin = markup / (100 + markup), and markup = margin / (100 - margin).

Default inputs (the Margin + Markup tab): Revenue / Selling Price 1,000 and Cost 700. Profit is 300.00, Gross Margin 30.00%, Markup 42.86%, Cost Ratio 70.00%. The same 300 is 30% of the price and 42.86% of the cost.

The costly mistake, run both ways. On the Revenue tab enter Cost 60 and Gross Margin 40: the page gives Revenue $100.00, Gross Profit $40.00 and Markup 66.67%, because 60 / (1 - 0.40) = 100. On the From Markup tab enter Cost 60 and Markup 40: it gives Revenue $84.00, Gross Profit $24.00 and Gross Margin 28.57%. Hitting a 40% margin therefore needs a 66.67% markup. Selling 500 units at 84 instead of 100 leaves 40 - 24 = 16 per unit short, or 8,000.00.

Common pairs worth remembering: a 50% markup is a 33.33% margin; a 100% markup (double the cost) is a 50% margin. A margin can never reach 100%, since that would mean zero cost, and a markup has no upper limit. If the price is below cost the page shows a loss with the minus sign in front of the dollar sign: on the Margin + Markup tab, Revenue 100 and Cost 120 give a Gross Profit of -$20.00, a Gross Margin of -20.00% and a Markup of -16.67%.

This is gross margin only. It leaves out rent, wages, shipping, card fees and tax, so the figure is not net profit.

How to Use This Calculator

  1. Pick a tab under Solve for: Margin + Markup (you know revenue and cost), Cost (you know revenue and margin), Revenue (you know cost and margin) or From Markup (you know cost and markup).
  2. Fill the fields that tab shows: Revenue / Selling Price, Cost, Gross Margin (%) or Markup (%). The page starts with 1,000, 700, 30 and 42.86, and commas are accepted.
  3. Press Calculate. Nothing updates while you type. Switching tabs clears the result and any error.
  4. Read the four tiles (Revenue, Cost, Gross Profit, Gross Margin) and the table below, which adds Markup and Cost Ratio. A loss appears as a negative amount such as -$20.00.
  5. If a red message appears, fix the field it names: for example "Revenue must be greater than 0 to calculate a margin.", "Gross margin cannot be above 100%." or "Cost must be greater than 0 to apply a markup."

Frequently Asked Questions

My supplier says 'add 30%' and my accountant says 30% margin. Are those the same?

No. Adding 30% to cost is a 30% markup, which gives a 23.08% margin. A 30% margin needs a markup of 42.86%, as the defaults show. Check which word is being used before you price.

Can I get a margin from a markup I already use?

Yes. Use the From Markup tab with any cost and your markup; the Gross Margin tile is the answer. It does not depend on the cost you enter.

What does Cost Ratio mean in the table?

It is cost divided by revenue. With a 30% margin the cost ratio is 70%. It is the share of each sale that goes to the cost of the goods.

Does the page include tax, discounts or fees?

No. Enter a price and cost on the same basis, both before tax. If you discount, use the discounted price as revenue.

Why is the result sometimes a cent out from my target?

The default markup of 42.86% is rounded from 42.857...%, so a 700 cost gives 1,000.02. Use the Revenue tab with the margin you want to avoid that rounding.