Profit margin calculator
Enter revenue, cost of goods sold and expenses: the calculator shows the gross, operating and net profit margin. Below it — the margin and markup for a single product.
- Free
- No sign-up
- Runs in your browser

Profit margin calculator
Margin on one product: from cost and selling price
Profit margin formulas
| Margin | Formula | Example: revenue €50,000 |
|---|---|---|
| Gross profit margin | (revenue − cost of goods sold) ÷ revenue × 100 | (50,000 − 32,000) ÷ 50,000 = 36% |
| Operating margin | (gross profit − operating expenses) ÷ revenue × 100 | (18,000 − 11,000) ÷ 50,000 = 14% |
| Net profit margin | (operating profit − interest, taxes, other costs) ÷ revenue × 100 | (7,000 − 2,000) ÷ 50,000 = 10% |
Use revenue without VAT: VAT you collect is not your income.
Profit margin in Excel
With revenue in A1 and the cost of goods sold in B1: gross margin =(A1-B1)/A1, formatted as a percentage. For one product with the cost in A1 and the selling price in B1: margin =(B1-A1)/B1, markup =(B1-A1)/A1.
Margin vs markup
A margin is counted on the selling price, a markup on the cost, so the same sale gives two different percentages: a product bought for €80 and sold for €100 has a 20% margin and a 25% markup. Setting prices by adding your target margin to the cost is the most common pricing mistake: it always lands below the margin you wanted.
| Target margin | Markup you need | Price for a €100 cost |
|---|---|---|
| 10% | 11.11% | €111.11 |
| 20% | 25% | €125 |
| 25% | 33.33% | €133.33 |
| 30% | 42.86% | €142.86 |
| 40% | 66.67% | €166.67 |
| 50% | 100% | €200 |
Need the selling price from a markup, tiered markups or marketplace fees? Use the markup calculator.
How online stores lose margin
- Shipping, packing and payment fees are left out of the product cost, so the gross margin looks better than the real one.
- Marketplace fees are taken from the selling price, but prices are calculated as if the full price stays with you.
- Supplier prices change and selling prices stay the same: the margin shrinks without anyone noticing.
- Discounts are planned from the markup, not from the margin: a 20% discount on a 25% markup wipes out the profit.
Frequently asked questions
How do you calculate profit margin?
Profit margin = profit ÷ revenue × 100. Gross margin uses revenue minus the cost of goods sold; net margin uses what is left after all expenses, interest and taxes. €50,000 of revenue and €5,000 of net profit is a 10% net profit margin.
What is a 25% profit margin?
It means a quarter of the selling price is profit: on a €100 sale you keep €25. For a single product with a €75 cost, the price for a 25% margin is 75 ÷ 0.75 = €100, which is a 33.33% markup.
What is the difference between gross and net profit margin?
Gross profit margin counts only the cost of the goods you sold. Net profit margin also subtracts operating expenses (ads, salaries, rent, shipping), interest and taxes, so it is always lower than the gross margin.
What is a good profit margin?
There is no single number: it depends on the industry, the business model and whether you look at gross or net margin. Compare your margin with your own previous periods and with data for your sector rather than with a general benchmark.
How do I calculate the selling price from a desired margin?
Selling price = cost ÷ (1 − margin ÷ 100). For a €60 cost and a 40% margin: 60 ÷ 0.6 = €100. Adding 40% to the cost gives €84 and only a 28.57% margin.
Is margin the same as markup?
No. Margin is profit as a share of the selling price, markup is profit as a share of the cost. A 25% markup is a 20% margin. The markup calculator converts one into the other.
