Skip to content

Margin calculator

A cost of 60 and selling price of 100 gives gross profit of 40, a gross margin of 40% and markup of 66.6667%. Enter cost and selling price to compare all three figures without confusing the selling-price base with the cost base.

What are the profit, margin and markup for a cost of 60 and selling price of 100?

Show numbers as

Gross profit

40
Cost
60
Selling price
100
Gross profit
40
Gross margin
40%
Markup
66.6667%

A discount reduces the selling price, not the cost. Recalculate margin after a sale offer. Discount calculator

What this calculator does

Gross profit is the selling price less the cost assigned to the item. Gross margin expresses that profit as a percentage of the selling price, while markup expresses it as a percentage of cost. The profit amount is the same in both ratios; only the denominator changes. On a profitable sale with positive cost, markup is therefore higher than margin.

This calculator compares the cost and selling price you supply. It does not automatically include overheads, finance costs, tax or delivery fees. Decide which costs belong in your comparison and use the same basis for every item. Gross profit is not necessarily the money a business keeps after all expenses, so do not label the result as net profit without a fuller calculation.

Formula

Gross profit = selling price − cost

Or in one step: Gross margin = profit ÷ selling price × 100; markup = profit ÷ cost × 100

In plain English, first take cost away from selling price. Divide that profit by the selling price for gross margin, or by cost for markup, then multiply by 100. A zero selling price makes margin unavailable and a zero cost makes markup unavailable. Profit and whichever ratio is computable are still shown rather than discarding the whole result.

Worked example

An item costs 60 and sells for 100. Gross profit is 100 − 60 = 40. Gross margin is 40 ÷ 100 × 100 = 40%. Markup is 40 ÷ 60 × 100 = 66.6667% when displayed to four decimal places. Both percentages describe the same profit of 40.

Markup-to-margin conversion table

The table compares a range of markups using a cost of 100. A selling price of 125 means profit of 25, which is a 25% markup but only a 20% margin. Each margin shown is computed from the corresponding cost and selling price rather than being a separately typed answer.

As markup rises, margin increases more slowly because selling price is also growing. Doubling cost to set the price gives a 100% markup but a 50% margin. A positive-cost margin cannot reach 100% at a finite price: some fraction of the sale still covers cost. Keep that distinction in mind when reading pricing targets.

Convert markup to gross margin
MarkupGross margin
0% markup0%
25% markup20%
50% markup33.3333%
100% markup50%
200% markup66.6667%

Worked examples: a smaller profit and a loss

An item costs 80 and sells for 100. Profit is 20, margin is 20% and markup is 25%. If a sale offer brings the price down to 90 without changing cost, profit becomes 10. Margin is then 10 ÷ 90 × 100 = 11.1111%, and markup is 10 ÷ 80 × 100 = 12.5%.

For a loss example, cost is 100 and selling price is 80. Profit is −20. Divide by price to get −25% margin, or by cost to get −20% markup. A percentage reduction in price does not translate directly into the same percentage reduction in profit, because cost has not changed with the offer.

Margin and markup in Excel and Google Sheets

With cost in A1 and selling price in B1, use =B1-A1 for gross profit. For gross margin as an ordinary percentage number, use =(B1-A1)/B1*100. For markup, use =(B1-A1)/A1*100. Both Excel and Google Sheets support these formulas, provided the respective denominator is non-zero.

For percentage-formatted result cells, omit the final *100 from the margin and markup formulas. Keep the profit cell numeric and format it as currency if appropriate. Check each denominator separately so a missing margin does not hide a valid markup, and avoid rounding profit before using it in either percentage calculation.

Everyday examples

ExampleAnswerTry it
Cost 60, selling price 10040
Cost 80, selling price 10020
Cost 100, selling price 80: a loss−20
Cost £24, selling price £40£16.00

Common mistakes

  • Using margin and markup interchangeably. A 25% markup on cost produces a 20% margin on selling price, not a 25% margin.
  • Treating gross profit as net profit. Costs not included in the entered cost figure still need to be accounted for elsewhere.
  • Mixing a VAT-inclusive selling price with a VAT-exclusive cost. Use a consistent tax basis appropriate to your calculation before comparing the two amounts.
  • Reusing the old margin after a sale offer. If selling price falls while cost stays fixed, gross profit and margin both change.

Common questions

What is the difference between margin and markup?

Margin divides profit by selling price; markup divides profit by cost. If cost is 80 and price is 100, profit is 20. The gross margin is 20 ÷ 100 = 20%, while markup is 20 ÷ 80 = 25%. Neither percentage should be reported without its label.

How do I calculate gross profit?

Take the cost away from the selling price. A cost of 60 and selling price of 100 gives gross profit of 40. This amount comes before any expenses you have not included in cost, so it is not automatically a business's final net profit.

How do I convert markup to margin?

For markup written as an ordinary percentage number, use margin = markup ÷ (100 + markup) × 100. A 25% markup gives 25 ÷ 125 × 100 = 20% margin. The conversion table on this page uses cost and selling-price examples calculated by this tool's own maths.

How do I convert margin to markup?

Use markup = margin ÷ (100 − margin) × 100 for the usual positive-cost case with margin below 100%. A 40% margin corresponds to 40 ÷ 60 × 100 = 66.6667% markup. At 100% margin, cost is zero and an ordinary finite markup is unavailable.

What happens if the cost is zero?

Profit still equals selling price. With a positive selling price, gross margin is 100%, but markup is unavailable because its denominator is zero. The calculator shows that note beside markup while keeping profit and gross margin visible. It does not treat the missing ratio as zero.

What happens if the selling price is zero?

Profit is the negative of cost and gross margin is unavailable because division by zero is undefined. If cost is positive, markup is −100%. If both cost and price are zero, profit is zero but both percentage ratios are unavailable, with a separate note for each.

Can gross margin be negative?

Yes. When an item sells below its cost, gross profit is negative. Cost 100 and price 80 gives profit −20, margin −25% and markup −20%. Signed inputs are also accepted, but negative costs or prices need careful interpretation and may not describe an ordinary profitable sale.

Last reviewed . Results use exact decimal arithmetic and are rounded once for display.