Margin Calculator
Enter any two of cost, selling price, profit, margin or markup — the calculator fills in the rest and shows the difference between margin and markup.
Enter any two values — the others are calculated.
Use prices without sales tax or VAT: tax is not part of your revenue.
More margin calculators
Each one starts from the question you are most likely asking.
What is profit margin?
Gross profit margin is the share of the selling price that you keep as profit after paying for the product itself. A margin of 20% means that 20 of every 100 in sales is gross profit and 80 covers the cost of goods.
Margin formulas
margin = profit ÷ price × 100
markup = profit ÷ cost × 100
price = cost ÷ (1 − margin)
Example: you buy a product for 80 and sell it for 100. Profit is 20, the margin is 20 ÷ 100 = 20%, and the markup is 20 ÷ 80 = 25%.
How to use the calculator
- Type any two values — for example cost and price, or cost and the margin you want.
- The other three are filled in at once. The two values you typed last are outlined and used for the calculation.
- The bar under the result shows how the price splits into cost and profit.
Margin vs markup
Both compare profit with something else: margin with the price, markup with the cost. That is why the markup is always the higher number for the same sale. Mixing them up is a classic pricing mistake — adding a 30% markup to the cost gives a margin of only 23%.
| Markup | Margin |
|---|---|
| 25% | 20% |
| 33.33% | 25% |
| 50% | 33.33% |
| 66.67% | 40% |
| 100% | 50% |
Gross margin, operating margin and net margin
This calculator works out gross margin per product or sale. Operating margin also subtracts running costs such as rent and salaries, and net margin subtracts everything, including interest and tax. A good gross margin depends on the industry — grocery retail often works with 20–30%, software with 70% or more.
Frequently asked questions
How do I calculate profit margin?
Subtract the cost from the selling price to get the profit, divide the profit by the selling price and multiply by 100. A product that costs 60 and sells for 100 has a 40% margin.
How do I calculate the price from a margin?
Divide the cost by (1 − margin). For a 30% margin on a cost of 70: 70 ÷ 0.7 = 100.
What is the difference between margin and markup?
Margin is profit as a share of the price; markup is profit as a share of the cost. A 50% markup equals a 33.33% margin.
Can the margin be over 100%?
No. The profit can never be larger than the price, so the margin stays below 100%. Markup has no upper limit.