Profit Margin Calculator
Calculate profit margin, markup and profit from cost and selling price.
Results update as you type.
About this calculator
A profit margin calculator turns a product’s cost and selling price into the profit, the margin (profit as a percent of the selling price) and the markup (profit as a percent of cost). Profit is simply price minus cost; margin divides that profit by the price, while markup divides the same profit by the cost — two different lenses on the same sale.
For example, an item that costs 40 and sells for 100 makes 60 profit. That is a 60% margin (60 ÷ 100) but a 150% markup (60 ÷ 40). The identical profit looks very different depending on which base you measure it against, which is why the two figures are easy to confuse.
Use it to price products for a target margin, to compare profitability across a range of items, and to translate a supplier’s markup into the margin you actually keep. Retail, wholesale and services all rely on getting this distinction right.
Frequently asked questions
What is the difference between margin and markup?
Margin is profit as a percent of the selling price; markup is profit as a percent of the cost. A £60 profit on a £40 cost item sold for £100 is a 60% margin but a 150% markup.
How do I price for a target margin?
Divide the cost by (1 − target margin). For a 40% margin on a £40 item: 40 ÷ 0.6 = £66.67 selling price.
How do I calculate profit margin?
Subtract the cost from the selling price to get the profit, then divide the profit by the selling price and multiply by 100. A 60 profit on a 100 sale is a 60% margin.
Can a profit margin be more than 100%?
No. Margin is profit as a share of the selling price, and profit can never exceed the price, so margin tops out just below 100% (when cost approaches zero). Markup, measured against cost, has no such ceiling and often exceeds 100%.
Why is my markup a bigger number than my margin?
Markup divides profit by the smaller cost, while margin divides the same profit by the larger selling price. Dividing by a smaller number gives a bigger percentage, so markup always looks higher than margin for the same sale.
What is the difference between gross and net margin?
The margin here is a gross margin: selling price minus the item’s direct cost. Net margin also subtracts overheads like rent, wages and marketing, so it is lower. Use this tool for per-item gross margin and pricing decisions.
API — use this calculator from code
Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →
Endpoint
GET https://calculator.free/api/v1/margin/
curl
curl "https://calculator.free/api/v1/margin/?cost=40&revenue=100"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/margin/?" + new URLSearchParams({
"cost": "40",
"revenue": "100"
}));
const data = await r.json();
console.log(data.results);
Results are estimates for general guidance only, not financial, medical or tax advice.