CalculateItNow home

Margin Calculator

Gross margin, markup and profit from cost and price — or the selling price for a target margin — with the margin-vs-markup table that trips everyone up.

Margin Calculator: with the default inputs, result is 20.

$
$
%
%
Try an example
Result
20
In words
Selling at $100.00 something that costs $80.00 gives a 20% margin (25% markup), $20.00 profit per unit.
Gross margin
20%
Markup
25%
Gross profit per unit
$20.00
Selling price
$100.00
Cost
$80.00
Assumptions
  • Gross margin only — no overhead, tax or discounts.
  • Cost means the full direct cost per unit, including freight in.
Gross margin bands, by cost and price
$0$50$100$150$2000285684112LossUnder 20%20 – 40%Over 40%You · 20% marginCostSelling priceGross margin bands, by cost and price
Markup vs. margin equivalents
Markup on cost= Gross margin$100 cost sells for
10%9.1%$110
15%13%$115
20%16.7%$120
25%20%$125
30%23.1%$130
33%25%$133
40%28.6%$140
50%33.3%$150
60%37.5%$160
75%42.9%$175
100%50%$200
150%60%$250
200%66.7%$300
300%75%$400

Margin = markup ÷ (1 + markup). Markup = margin ÷ (1 − margin). Doubling the cost (100% markup) is a 50% margin — "keystone" pricing.

Math verified by automated testsUpdated 2026-09-082 sources cited

How this is worked out

The formula

Gross profit = price − cost
Margin % = (price − cost) ÷ price × 100
Markup % = (price − cost) ÷ cost × 100
Price from margin = cost ÷ (1 − margin)
Price from markup = cost × (1 + markup)
Margin = markup ÷ (1 + markup)

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

What do you know?
Choose one of 4 options.Cost and price → margin & markup · Cost and target margin → price · Price and target margin → cost · Cost and markup → price & margin
Cost
What you pay for the item or to deliver the service (COGS).in dollars · 0 or more · defaults to 80
Selling price
A number.in dollars · 0 or more · defaults to 100
Target margin
Gross margin as a share of the selling price. Used in the price and cost modes.a percentage · from 0 to 99.99 · defaults to 20
Markup
Percentage added on top of cost. Used in the markup mode.a percentage · 0 or more · defaults to 25

What you get back

Resultmain answer
In words
Gross margin
Markup
Gross profit per unit
Selling price
Cost

What this assumes

  • Gross margin only — no overhead, tax or discounts.
  • Cost means the full direct cost per unit, including freight in.

About this calculator

Margin and markup describe the same dollars from opposite ends, and mixing them up is one of the most common — and expensive — pricing mistakes in small business. Markup is profit as a percentage of cost; margin is profit as a percentage of price. A product that costs $80 and sells for $100 has a 25% markup but only a 20% margin. Someone who wants a "30% margin" and adds 30% to cost ends up with 23% — a big gap across a year of sales.

How to use it

Pick what you know. Cost and price gives you margin, markup and unit profit. Cost and a target margin gives the price you need to charge — the mode to use when you're setting prices to hit a gross-margin goal. Price and a target margin tells you the most you can pay a supplier and still hit your number, which is the mode for negotiating purchases. Cost and markup is for shops that price by a multiplier ("cost times 2.2").

Margin vs. markup, in one table

The table below is the conversion every buyer and merchandiser eventually memorizes: 25% markup = 20% margin, 50% markup = 33% margin, 100% markup ("keystone") = 50% margin. Margins can never reach 100%; markups can be any size. The bigger the number, the wider the gap.

Which one to use

  • Margin is what appears on your income statement (gross margin = gross profit ÷ revenue). Lenders, investors and industry benchmarks all speak in margin.
  • Markup is convenient at the counter and in a spreadsheet of costs, because you multiply straight through.

If your accountant says the business needs a 35% gross margin to cover overhead, price at cost ÷ 0.65 — a 54% markup — not cost × 1.35.

What this calculator doesn't include

This is gross margin: price less the direct cost of the goods or the service. Rent, salaries, marketing and taxes come out afterwards; see the profit calculator for the full income-statement walk from revenue to net profit. Sales tax and VAT are also excluded — they're collected on top of the price and passed through, so they don't change your margin.

Frequently asked questions

What's the difference between margin and markup?

Margin divides profit by the selling price; markup divides it by cost. A $20 profit on an $80 cost is a 25% markup and a 20% margin ($20 of $100). Margin is always the smaller number.

How do I price for a target margin?

Divide cost by (1 − margin). For a 40% margin on a $30 cost: 30 ÷ 0.6 = $50. Adding 40% to cost would give $42 and only a 28.6% margin.

What is a good gross margin?

It depends entirely on the industry. Grocery runs 20–30%, restaurants 60–70% on food (before labor), retail apparel 50–60%, software 70–90%. Compare against your own sector, not a universal number.

Is a 50% margin the same as doubling the price?

Yes. Doubling cost is a 100% markup, which equals a 50% margin. Retailers call it keystone pricing.

Does margin include overhead?

Gross margin doesn't — it's price less direct cost only. Net margin subtracts everything (rent, payroll, marketing, interest, tax). A business can have a healthy gross margin and still lose money.

Put this calculator on your own site

A working margin, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Margin Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a margin.

All business calculators·Browse everything