Finance

Margin & Markup Calculator

Enter any two of cost, selling price, profit, margin or markup and get the rest instantly, with a clear margin vs markup explanation and a conversion table.

What you know
Pick any two values. The rest update as you type.
$
$

Margin and markup describe the same profit two ways, so one of the pair is always a money amount. Use prices before sales tax: GST, HST or sales tax you collect goes to the government and isn't part of your revenue or profit.

Selling price
$100.00
Cost
$60.00
Profit
$40.00
Margin
40%
Profit / selling price
Markup
66.67%
Profit / cost

Price is 1.6667x the cost, and cost is 60% of the price.

Margin or markup?

Both compare the same profit to something different. Margin divides it by the selling price; markup divides it by the cost.

Buy something for $60 and sell it for $100: the profit is $40, the margin is 40% ($40 of $100) and the markup is 66.67% ($40 on top of $60).

Markup is always the bigger number for a profitable sale. Margin can never reach 100% unless the cost is zero, while markup has no upper limit. A common mistake is adding a 30% markup and expecting a 30% margin: it gives only 23.08%.

margin = markup / (1 + markup)
markup = margin / (1 - margin)

Conversion table
The margin you get from a markup, and the markup you need for a margin.
MarkupMargin
10%9.09%
15%13.04%
20%16.67%
25%20%
30%23.08%
33.33%25%
40%28.57%
50%33.33%
60%37.5%
75%42.86%
100%50%
150%60%
200%66.67%
300%75%
MarginMarkup
5%5.26%
10%11.11%
15%17.65%
20%25%
25%33.33%
30%42.86%
35%53.85%
40%66.67%
45%81.82%
50%100%
60%150%
70%233.33%
75%300%
80%400%
90%900%

About this tool

The Margin & Markup Calculator solves a sale from whichever two numbers you have. Pick cost and price, cost and margin, cost and markup, cost and profit, price and margin, price and markup, price and profit, profit and margin, or profit and markup, and it works out the selling price, cost, profit, margin and markup as you type, plus the price-to-cost multiplier. Losses are flagged, and impossible inputs get a plain explanation instead of a wrong number: a margin of 100% or more with a real cost, a zero cost where markup has no value, or a loss bigger than the cost. Money is rounded to the cent, and if that rounding nudges the percentages it tells you. A short explanation shows why a 30% markup is only a 23.08% margin, and a conversion table lists common markups with their margins and the markup you need for each margin. Everything runs in your browser.

How to use the Margin & Markup Calculator

  1. Pick the two values you know, such as Cost + margin.
  2. Type them in. Use amounts before sales tax.
  3. Read the selling price, cost, profit, margin and markup; the solved values are highlighted.
  4. Copy any result, or use the conversion table to translate a markup into a margin.

Use it from your code

The Margin & Markup Calculator is also a REST API endpoint. Create a free API key and call it from your own scripts and apps.

# Cost and margin
curl -X POST https://opentools.ca/api/v1/tools/margin-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "cost": 60,
  "margin": 40
}'

# Price and markup
curl -X POST https://opentools.ca/api/v1/tools/margin-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "price": 100,
  "markup": 30
}'

Give us your feedback

Help us improve Margin & Markup Calculator!

Frequently asked questions

What is the difference between margin and markup?

Both use the same profit. Margin divides it by the selling price; markup divides it by the cost. Buying at $60 and selling at $100 is a 40% margin and a 66.67% markup.

How do I price something for a 30% margin?

Divide the cost by 1 minus the margin: a $70 cost at a 30% margin sells for $70 / 0.7 = $100. Choose Cost + margin and the calculator does it for you, rounded to the cent.

Why can't margin be 100% or more?

Margin is profit as a share of the selling price, and the profit can only be the whole price if the item cost nothing. Markup has no such limit: a 200% markup triples the cost.

Can it handle a loss?

Yes. A price below cost shows as a loss with a negative margin and markup, and you can enter a negative profit or negative percentage in the other modes.

Should I include sales tax?

No. Use the cost and price before GST, HST or sales tax. Tax you collect is passed on to the government and isn't part of your revenue or profit.

Margin & Markup Calculator screenshot