Margin Calculator

Calculate profit margin, markup, and gross profit from any two numbers. Work forwards from cost or backwards from the price you want to charge.

What do you know?

$

What you pay per unit, before markup

$

What the customer pays per unit

Gross Profit

$60.00

What you keep per unit before operating expenses.

Margin

60%

Markup

150%

Gross Profit

$60.00

Cost

$40.00

Running margin math on vendor invoices all day?

See how OrderSync automates the line-item work

Margin vs Markup: The Difference

Margin is profit as a share of the selling price. Markup is profit as a share of the cost. Same dollars, different denominator, and mixing them up is one of the most common pricing mistakes in wholesale and retail. A product that costs $50 and sells for $100 has a 100% markup but only a 50% margin.

To convert between them: markup = margin / (1 - margin), and margin = markup / (1 + markup), where both are expressed as decimals. The table below covers the conversions that come up most often.

MarkupEquivalent Margin
20%16.7%
25%20%
50%33.3%
75%42.9%
100%50%
150%60%
200%66.7%

Note the 100% markup row: doubling your cost, known as keystone pricing, gives you a 50% margin. That single row explains most of the confusion between the two terms.

The Formulas

Every result on this page comes from four short formulas. Here they are in plain form so you can check the math or drop them into a spreadsheet:

  • Gross profit = selling price - cost
  • Margin % = (selling price - cost) / selling price x 100
  • Markup % = (selling price - cost) / cost x 100
  • Selling price from target margin = cost / (1 - margin / 100)
  • Cost from price and margin = price x (1 - margin / 100)

Margin Math on Real Invoices

Distributors and retailers run this exact math on every line of every vendor invoice. A price change of a few cents per case moves the margin on thousands of units, so buyers check unit cost against selling price every time a new invoice or price list arrives. When freight is involved, run the numbers on landed cost, not invoice cost, or your margin will look better than it is. And if you are keying those invoice lines by hand, you can extract every line from a vendor invoice automatically instead.

FAQ

It varies enormously by industry, so compare against your own category, not a universal number. Grocery runs on 1-3% net margins but high volume. Gift and specialty retail typically targets 45-55% gross margin. Restaurants usually land at 3-9% net after food, labor, and rent. A 'good' margin is one that covers your operating costs with room left over, benchmarked against similar businesses.

Use margin when you think about profitability and financial statements, since revenue is the denominator accountants use. Use markup when you set prices from cost, because it answers 'what do I multiply my cost by?' Just never mix them: applying a 40% markup when you need a 40% margin leaves you roughly 11 points short.

A 100% margin means the entire selling price is profit, which requires the product to cost you nothing. The formula price = cost / (1 - margin) divides by zero at 100%. Markup has no such ceiling: a 300% markup is fine, and it equals a 75% margin.

Keystone pricing means doubling your wholesale cost to set the retail price: a 100% markup, which works out to a 50% gross margin. It has been the traditional starting point in gift, apparel, and specialty retail for decades. Many retailers now adjust up or down from keystone by category rather than applying it across the board.

Decide the gross margin you need, then divide cost by (1 - margin). For a $12 cost and a 45% target margin: 12 / 0.55 = $21.82. Do not multiply cost by the margin percentage, because that gives you markup math and a thinner margin than you planned.