Profit Margin Calculator

Work out gross profit, profit margin and markup from cost and price, or solve backwards from a target margin.

Profit margin —

Profit breakdown per unit
Selling price —
Cost —
Gross profit per unit —
Profit margin —
Markup on cost —

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

This is a gross profit margin calculator: it compares your selling price with the direct cost of the item (cost of goods sold), before overheads, salaries or tax. Gross profit is price − cost, the profit margin is (price − cost) ÷ price × 100 and the markup is (price − cost) ÷ cost × 100. Margin is a share of the price, markup is a share of the cost — which is why a product that costs 40 and sells for 100 has a 60% margin but a 150% markup.

Switch the first dropdown to work backwards. Given a cost and a target margin the price is cost ÷ (1 − margin ÷ 100), so a 70 cost at a 30% margin must sell for 100. Given a price and a target margin the cost you can afford is price × (1 − margin ÷ 100). Given a cost and a target markup the price is cost × (1 + markup ÷ 100). Add the number of units you expect to sell and the table also shows total revenue, total cost and total gross profit.

A target margin of 100% or more is impossible — it would mean the item costs nothing — so the calculator flags it instead of returning a nonsense price. If the price is below the cost you get a negative margin, which is the correct answer for a loss-making sale. Everything is plain JavaScript running in your browser: no signup, no ads and none of your numbers leave your device.

Frequently asked questions

How do you calculate profit margin?

Gross profit margin is profit divided by the selling price: margin = (price − cost) ÷ price × 100. An item that costs 40 and sells for 100 makes 60 profit, so the margin is 60 ÷ 100 = 60%. This is gross margin, which only subtracts the direct cost of the goods, so overheads, salaries and tax come out of that 60% afterwards.

What is the difference between margin and markup?

Margin is a share of the selling price, markup is a share of the cost. The same 40 cost sold at 100 is a 60% margin but a 150% markup, because 60 profit is 60% of the 100 price and 150% of the 40 cost. Markup is always the bigger number, and mixing the two up is the classic pricing mistake: a 30% markup only leaves a 23.1% margin. This calculator shows both at once.

How do I set a price for a target profit margin?

Divide the cost by one minus the margin rather than adding the percentage on top: price = cost ÷ (1 − margin ÷ 100). At a 30% target margin a 70 cost must sell for 70 ÷ 0.7 = 100. Adding 30% to 70 would give 91, which is only a 23.1% margin. A target margin of 100% or more is impossible, since it would mean the item costs nothing, so the calculator flags that instead of returning a bogus price.

Report a bug