Small Business Math

Markup vs Margin: Pricing Formulas in Excel

Markup and margin both measure profit but use different bases. Learn the Excel formulas for each, how to set a price from either, and why the numbers differ.

On this page
  1. The short answer
  2. A worked example
  3. Formulas for each
  4. Setting a price from a markup
  5. Setting a price from a target margin
  6. Rounding the price
  7. What the formulas leave out
  8. Checking your numbers

The short answer

Markup is profit as a percentage of cost. Margin is profit as a percentage of the selling price. The same dollar profit gives two different percentages, so check which one a pricing rule uses before you put it in a formula.

A worked example

Say a product costs $60 and sells for $90. The profit is $30.

  • Markup: 30 ÷ 60 = 50%
  • Margin: 30 ÷ 90 = 33.3%

A 50% markup works out to a 33.3% margin. It’s the same deal described two ways, and the two percentages are easy to confuse.

Formulas for each

With the cost in A2 and the selling price in B2, the two formulas are:

  • Markup: =(B2-A2)/A2
  • Margin: =(B2-A2)/B2

Format both results as percents. The only difference between them is the denominator: cost for markup, price for margin.

Setting a price from a markup

Multiply the cost by 1 plus the markup. If the markup is in C2 as 50%:

=A2*(1+C2)

A $60 cost with a 50% markup gives $90.

Setting a price from a target margin

Divide the cost by 1 minus the margin. For a 40% margin on a $60 cost:

=A2/(1-C2)

60 ÷ 0.6 gives $100. Check it: ($100 − $60) ÷ $100 = 40%.

A margin of 100% or more has no workable price, because the formula divides by zero or by a negative number. A guard keeps the sheet readable:

=IF(C2>=1,"Check margin",A2/(1-C2))

Rounding the price

Prices are normally kept to the cent, so wrap the result in ROUND:

=ROUND(A2/(1-C2),2)

Some businesses round to prices ending in .99 or a similar pattern. That’s a separate rule and needs its own step. The rounding options are covered in round to nearest cent in excel.

What the formulas leave out

Both formulas use only the cost you enter. If shipping, card fees, packaging or other costs apply to a sale, add them to the cost before you set a price, or your margin will look better than it is.

Sales tax is usually collected on behalf of a government rather than kept as revenue, so it generally stays out of the margin calculation. The sales tax formula in excel guide covers the tax side separately.

Checking your numbers

Test the formulas with a cost and a price you already know. A $60 cost sold at $90 should show a 50% markup and a 33.3% margin. Then reverse it: a 50% markup on $60 should give $90, and a 40% margin on $60 should give $100.

If you don’t know the cost of each item, the cost is often kept in your stock records. How to track inventory in excel with formulas shows one way to keep those figures current.

The complete guide to small business math

Excel Formulas for Small Business
Read the guide

Keep exploring

Guides from other topics

All topics →