Article
Margin Calculator: How to Calculate Profit Margin
Profit margin tells you what share of the selling price is profit. This article gives the formula, explains the difference between margin and markup, shows how to find a price from a margin and gives four worked examples. You can check your own numbers in the margin calculator. For a price of 100 and a cost of 70 the margin is 30% and the markup is 42.86%.
Last updated:
Calculate profit margin in the margin calculator. Find markup in the markup calculator and a price from a margin in the selling price from margin calculator.
The profit margin formula
Margin is the ratio of profit to the selling price. Profit is the difference between price and cost, and you express the margin as a percentage of the price.
margin = (price − cost) ÷ price × 100%
example: (100 − 70) ÷ 100 = 30%
| Price | Cost | Profit | Margin | Markup |
|---|---|---|---|---|
| 100 | 70 | 30 | 30% | 42.86% |
| 100 | 80 | 20 | 20% | 25% |
| 150 | 100 | 50 | 33.33% | 50% |
| 200 | 120 | 80 | 40% | 66.67% |
| 50 | 40 | 10 | 20% | 25% |
Margin can never exceed 100% of the price, while markup can be any size, because you divide profit by cost.
Try it with an example
Example: a selling price of 100 and a cost of 70. Both values are already stored in the link to the calculator.
- Selling price
- 100
- Cost
- 70
- Result
- profit 30, margin 30%, markup 42.86%
Open the calculator with these numbers
The calculator reads the values from the page address and shows the result right away. You can change them freely.
How the calculator works
The calculator divides profit (price minus cost) by the price and shows the margin as a percentage, along with the profit per unit and the markup. The discount mode first lowers the price and then uses the same formula. Optionally it takes a quantity, tax included in the price (an extra net margin row) and checks whether the margin meets a chosen target. It does not know fixed costs, fees or returns, so the result is gross margin per unit.
Margin versus markup
Markup is profit divided by cost: (price − cost) ÷ cost. For a price of 100 and a cost of 70 it is 42.86%, while the margin of the same sale is 30%. So a 30% markup is not a 30% margin: a price with a 30% markup is 70 × 1.3 = 91, and the margin is then 23.08%.
To convert: markup = margin ÷ (1 − margin), and margin = markup ÷ (1 + markup). Work out markup in the markup calculator and a price from markup in the selling price from markup calculator.
How to find a price from a margin
When you know the cost and want a margin m, the selling price is cost ÷ (1 − m). For a cost of 70 and a 30% margin you get 70 ÷ 0.7 = 100. For a 20% margin the price is cost times 1.25, which is 87.50 for a cost of 70.
You can also find the price in the selling price from margin calculator. The gross profit calculator shows profit as the difference between price and cost.
Margin after a discount and net margin
A discount lowers the price while the cost stays the same, so the margin falls. For a price of 100, a cost of 70 and a 10% discount the price is 90, the profit is 20 and the margin is 22.22%. The 10% discount therefore cut the margin by 7.78 percentage points.
When a price includes tax, compute the margin on the price before tax. A price of 123 with 23% tax is 100 before tax, so with a cost of 70 the margin is 30%, not 43.09%. Convert amounts with tax in the VAT calculator.
Where a margin calculator helps
You calculate margin when you price products, quotes and services. The point where sales stop making a loss is found by the break-even calculator, and the payback time of an investment by the payback period calculator.
Percentages are covered in How to Calculate the Percentage of a Number and price changes in Percentage Change. The cost of a working hour in services is in the hourly labor cost calculator.
Four worked examples
You can repeat each example in the margin calculator.
1. Price 100, cost 70
The basic margin calculation.
- Enter a price of 100 and a cost of 70.
- Find the profit: 100 − 70 = 30.
- Divide by the price: 30 ÷ 100.
- The margin is 30% and the markup is 42.86%.
2. A price from a 30% margin with a cost of 70
Finding the price.
- Write the formula: price = cost ÷ (1 − margin).
- Compute 1 − 0.3 = 0.7.
- Divide 70 ÷ 0.7.
- The price is 100.
3. A 30% markup on a cost of 70
Markup versus margin.
- Find the price: 70 × 1.3 = 91.
- Find the profit: 91 − 70 = 21.
- Divide the profit by the price: 21 ÷ 91.
- The margin is 23.08%, which is less than 30%.
4. A 10% discount on a price of 100 with a cost of 70
Margin after a discount.
- Find the discounted price: 100 × 0.9 = 90.
- Find the profit: 90 − 70 = 20.
- Divide 20 ÷ 90.
- The margin is 22.22%.
Common mistakes when calculating margin
- Confusing margin with markup — margin divides profit by price, markup divides it by cost.
- Adding the margin to the cost instead of dividing — a price for a 30% margin is cost ÷ 0.7, not cost × 1.3.
- Calculating margin on a price with tax — margin is calculated on the price before tax.
- Forgetting the discount — a discount lowers the price while the cost stays the same.
- Assuming margin can exceed 100% — profit is never larger than the price.
- Mixing percentage points with percent — a drop from 30% to 22% is 8 percentage points.
- Ignoring extra costs — gross margin leaves out fixed costs and fees.
Frequently asked questions
How do you calculate profit margin?
Subtract the cost from the price, divide by the price and multiply by 100. For a price of 100 and a cost of 70 the margin is 30%.
What is the difference between margin and markup?
Margin divides profit by price and markup divides it by cost. For a profit of 30 and a cost of 70 the margin is 30% and the markup is 42.86%.
How do I calculate a price for a 30% margin?
Divide the cost by 0.7. For a cost of 70 the price is 100.
How do I calculate a 20% profit margin?
Divide the cost by 0.8, which is the same as multiplying by 1.25. For a cost of 70 the price is 87.50.
Is a 30% margin the same as a 30% markup?
No. A 30% margin equals a 42.86% markup, and a 30% markup gives a 23.08% margin.
How does a discount affect margin?
It lowers the price while the cost stays the same. A 10% discount on a price of 100 with a cost of 70 cuts the margin from 30% to 22.22%.
Is margin calculated before or after sales tax?
Before tax. A price of 123 with 23% tax is 100 before tax.
Does the calculator include fixed costs?
No. The result is gross margin per unit, without fixed costs, fees or returns.
Calculate your own margin
Enter a price and a cost in the margin calculator and read the profit, the margin and the markup. Optionally add a discount, a quantity and a target margin.
Find a price from a margin in the selling price from margin calculator, and the break-even point in the break-even calculator.