Skip to content
LoveToCalc

Margin calculator

Work out your margin and markup from cost and price — or the price you need to charge for a target margin. Compare two pricings side by side.

Your numbers

Calculate

Enter what the item costs you and what you sell it for.

Result

Margin

40%

Put a second set of numbers beside this one and see the difference.

Profit
$40.00
Markup
66.67%

Selling at $100 with a cost of $60 leaves $40.00 in profit — a margin of 40% and a markup of 66.67%.

Enter amounts excluding VAT/sales tax. This is gross margin on one price: discounts, overheads and other costs are not included.

Margin and markup are not the same

Both describe the same profit, but compared with different amounts:

An item that costs $60 and sells for $100 makes $40 in profit. That is a 40% margin ($40 of $100) but a 66.67% markup ($40 on top of $60). Markup is always higher than margin when you make a profit.

Formula

Profit = P − C

Margin = (P − C) / P

Markup = (P − C) / C

P = C / (1 − margin)

Example: pricing for a target margin

Your cost is $60 and you want a 40% margin. The price is $60 / (1 − 0.40) = $100.

A common mistake is to add 40% to the cost instead: $60 + 40% = $84. That is a 40% markup, but the margin is only $24 / $84 = 28.57%.

Margin to markup

Margin Markup
10% 11.11%
20% 25%
25% 33.33%
30% 42.86%
40% 66.67%
50% 100%

What the calculator does not include

Enter amounts excluding VAT or sales tax. The result is the gross margin on a single price: discounts, shipping, payment fees, rent, salaries and other overheads are not included.

Working backwards: what can the item cost?

If you know the price customers will pay, turn the formula around: C = P × (1 − margin). To sell an item for $50 at a 40% margin, it can cost at most $50 × 0.60 = $30 to buy. That is a useful number to have before you talk to a supplier.

Discounts eat margin faster than you think

A discount comes off the price, but the cost stays the same, so the whole discount comes out of profit. Take the item above that costs $60 and sells for $100:

Discount Price Profit Margin Units sold for the same profit
0% $100 $40 40% 1
10% $90 $30 33.33% 1.33
20% $80 $20 25% 2

At 20% off you have to sell twice as much to earn the same. The discount calculator gives the price after a discount.

Common mistakes

Frequently asked questions

Can a margin be more than 100%? No. Margin is profit as a share of the price, and profit can never be larger than the price. Markup has no upper limit: selling something that costs $10 for $50 is a 400% markup but an 80% margin.

What does a negative margin mean? You sell below cost. With a cost of $80 and a price of $64 you lose $16, a margin of −25%.

What is the difference between gross margin and net margin? Gross margin compares the price with what the item cost to buy or make. Net margin compares the profit after every cost, including rent, wages and tax, with total revenue. The calculator works out gross margin on one item.

What is a good margin? It depends entirely on the industry. A shop selling a lot of cheap goods can live on a lower margin than a business selling a few expensive services. Compare with businesses like yours, and check whether the margin covers your fixed costs.

Last reviewed September 24, 2026 ·How pages are reviewed

The formula behind this

All business calculators

Put this calculator on your site

Copy the code into your page where the calculator should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.