Margin Calculator

Work out the gross margin and markup on a product, or set a selling price from the margin or markup you want, and see exactly how the two percentages differ.

Your results

–

Save this calculation and come back to it any time. Members only — $5 every 3 months, ad-free.

Become a member

How to use the margin calculator

  1. Choose what you know: the cost and the selling price, the cost and a target margin, or the cost and a markup.
  2. Enter the cost of one item: what you pay a supplier or what it costs to make.
  3. Enter the selling price, the gross margin or the markup, depending on the choice in step 1.
  4. Read the result, the working, and the table of matching margins and markups for your cost.

The margin and markup formulas

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

Both percentages describe the same dollar profit. Margin compares it with the selling price, which is what you collect. Markup compares it with the cost, which is what you paid. In the conversion lines, margin and markup are decimals, so 25% is 0.25.

Worked example

The calculator starts with an item that costs $40 and sells for $50:

  • Gross profit: $50 − $40 = $10
  • Gross margin: $10 ÷ $50 × 100 = 20%
  • Markup: $10 ÷ $40 × 100 = 25%

Going the other way, a 35% target margin on the same $40 cost needs a price of $40 ÷ (1 − 0.35) = $40 ÷ 0.65 = $61.54. A 50% markup gives $40 × 1.5 = $60.00, which is only a 33.33% margin. If you sold the item for $30, you would lose $10 on each one, a margin of −33.33%.

Margin vs. markup

The same profit always looks bigger as a markup, because the cost is smaller than the price. Mixing them up is one of the most common pricing mistakes: a shop owner who wants a 50% margin but adds a 50% markup ends up with only 33.33%.

Gross margin Same as markup Price on a $40 cost Gross profit
10% 11.11% $44.44 $4.44
20% 25% $50.00 $10.00
25% 33.33% $53.33 $13.33
30% 42.86% $57.14 $17.14
40% 66.67% $66.67 $26.67
50% 100% $80.00 $40.00
60% 150% $100.00 $60.00
75% 300% $160.00 $120.00

Margin can never reach 100%, because that would mean a cost of zero. Markup has no ceiling: an item bought for $40 and sold for $160 has a 300% markup.

Which one to use

Use margin when you look at profitability, compare products or read financial statements. Gross margin from a set of accounts is gross profit divided by revenue, and most industry benchmarks are quoted the same way. Use markup when you set prices from a supplier's cost, because it is a quick multiplier: a 25% markup means cost × 1.25.

Gross margin covers only the direct cost of the product. Rent, wages, shipping, card fees and advertising still have to come out of it, so a healthy gross margin can still leave a thin net profit. If you discount the price later, check the new margin with the discount calculator first.

Frequently asked questions

What is a good profit margin?

It depends on the industry. Grocery stores keep only a small slice of each sale once all their costs are paid and rely on volume, while software and many service businesses keep much more of each dollar. Compare your margin with businesses like yours, and make sure it covers your overheads with something left over.

How do I convert markup to margin?

Divide the markup by 1 plus the markup, using decimals. A 25% markup is 0.25 ÷ 1.25 = 0.20, a 20% margin. To go from margin to markup, divide the margin by 1 minus the margin: 0.20 ÷ 0.80 = 0.25.

Why is my margin lower than my markup?

Because margin divides the profit by the selling price and markup divides it by the cost. The price is always larger than the cost when you make a profit, so the margin is always the smaller of the two.

Does the margin include sales tax?

No. Leave sales tax and VAT out of both the cost and the price. Tax you collect belongs to the government, so including it would make your margin look higher than it is.

Related calculators

  • Discount Calculator — Final price after a percent or dollar discount, with an optional second stacked discount and sales tax.
  • Commission Calculator — Sales commission at a flat rate or in tiers, plus total pay with a base salary and the sales needed to hit a target.
  • ROI Calculator — Return on investment as a percentage, the gain or loss, and the annualized ROI from a length or two dates.
  • Percentage Calculator — Percent of a number, what percent one number is of another, percentage change and difference.

Results are estimates for educational purposes and are not financial, tax or legal advice. See our disclaimer.