
Profit Margin: What It Is, How to Calculate It and Examples
Published on:
Reading time: 13 min
Topic: Entrepreneurship
Author: Leandro Valencia
Learn what profit margin is, its formula, how it differs from markup and profit, and how to set a 20% or 30% margin with examples.
Table of Contents
- In short
- What profit margin is and what it tells you
- How to calculate the profit margin of a product
- Common mistakes when calculating margins
- How to use margin to decide better
- Next step
- Sources
Profit margin is the percentage of each sale that stays in your business after subtracting costs. It is calculated as: (price − cost) / price × 100. If you sell something for €20 and it costs you €15, you earn €5 and your margin is 25%. It seems simple, but nearly all pricing errors come from confusing it with markup on cost or from forgetting costs that really exist.
In this guide we work through it step by step, with numbers, so you can make pricing decisions with clarity. If what you need is the full process for setting the price of a product (unit cost, channel fees and taxes), you will find it in our guide on how to calculate the selling price. And if you would rather not do the maths by hand, use the profit margin and selling price calculator, free of charge.
In short
- Profit margin measures what share of the selling price becomes profit: (price − cost) / price × 100.
- It is not the same as profit (an amount in euros) or markup (a percentage on the cost): with a cost of €15 and a price of €20, profit is €5, the margin is 25% and the markup is 33.3%.
- There are three levels: gross, operating and net margin. The more costs you include, the closer you get to the reality of your business.
- To reach a target margin, divide the cost by (1 − margin): with a cost of €100 and a 30% margin, the price is €142.86, not €130.
What profit margin is and what it tells you
Profit margin indicates what percentage of your revenue ends up as profit. It is one of the basic indicators for assessing a business's profitability and efficiency, which is why it appears in any serious analysis of pricing, products or the company as a whole.
The key lies in the denominator: margin is always calculated over the selling price. A 25% margin means that, of every €100 you collect, €25 is profit and €75 covers the cost considered in the calculation. That is why it is useful for comparing products with very different prices: a 40% margin on a €10 item and a 40% margin on a €500 item tell the same proportional story, even though the money they leave behind is very different.
The term also has a macroeconomic use. A Funcas study on business profits in Spain explains that profits are measured in relative terms, per euro of revenue or of gross value added, and that this normalised value is what is known as the profit margin. It is the same idea you apply in your project, on a different scale.
The profit margin formula, step by step
The basic formula is:
Margin (%) = (selling price − cost) / selling price × 100
In management accounting it is also expressed as net profit over net sales. An academic management accounting textbook (OpenStax) illustrates it with a company that earns $35,000 of net profit on $120,000 of sales: a 29% margin, that is, $0.29 of profit for every dollar sold.
Example with a simple product
Imagine you sell handmade notebooks:
- Selling price: €20.
- Cost: €15.
- Profit: 20 − 15 = €5.
- Margin: 5 / 20 = 0.25, that is, 25%.
The remaining 75% of each sale covers the cost of the notebook. Every time you change the price or the cost, repeat the calculation using the same criteria.
Three precautions to make the calculation reliable
- Work without VAT. VAT is not yours: you collect it on behalf of the tax authority. If you put the price including VAT into the formula, your margin will come out inflated.
- Compare the same unit. If the cost is for a box of 12 units and the price is for a single one, the result means nothing.
- Always use the same cost criteria. If today you include shipping and tomorrow you don't, you will not be able to compare products or periods.
Margin, profit and markup: they are not the same
This is where almost everyone trips up. They are three different concepts, and all three appear in pricing conversations as if they were interchangeable.
- Profit: the absolute difference between revenue and costs, in euros.
- Margin: that difference as a percentage of the selling price.
- Markup: that difference as a percentage of the cost.
With the notebook example:
| Concept | Calculation | Result |
|---|---|---|
| Profit | €20 − €15 | €5 |
| Margin | €5 / €20 | 25% |
| Markup | €5 / €15 | 33.3% |
Another case: a product that costs €50 and sells for €100. According to Rankia Business, the margin is 50% and the markup is 100%. Same operation, two very different percentages.
Margin can never reach 100% as long as you have any cost, whereas markup can exceed it. If someone tells you “I make a 100% gain”, always ask what it is based on: the cost or the sale.
How to convert one into the other
The conversions are direct:
- Margin = markup / (1 + markup). A markup of 30% is equivalent to a margin of 23.1%.
- Markup = margin / (1 − margin). A 25% margin requires a 33.3% markup on the cost.
Many entrepreneurs “put 30% on top of the cost” and believe they have a 30% margin. With a cost of €100, the price would be €130 and the real margin 30 / 130 = 23.08%. To get an exact 30% margin you need a different calculation, which we cover below.
Gross, operating and net margin
When you say “margin” on its own, it is worth knowing which one you mean. These are three levels that add up costs:
| Level | What it subtracts from sales | What it tells you |
|---|---|---|
| Gross margin | Only the direct cost of the product or service | Whether what you sell makes economic sense before other expenses |
| Operating margin | In addition, overheads: salaries, rent, utilities, software, logistics, marketing | The real efficiency of the activity |
| Net margin | All of the above plus interest and taxes | The final result left for you |
The description of these three levels matches that of Rankia Business. In Spain, the tax on company profits is mainly the Corporate Income Tax (Impuesto sobre Sociedades), as explained in this overview of business profit types, which adds that operating profit isolates the profitability of the core activity from financing decisions and the tax burden.
An example with the three margins
A consulting service is billed at €1,000. The direct cost is €400 and the allocated fixed costs are €300. Following the Ideiatek example:
- Gross margin: (1,000 − 400) / 1,000 = 60%.
- Net profit: 1,000 − 400 − 300 = €300, a net margin of 30%.
The gap between 60% and 30% is exactly what your overheads eat up. If you only look at gross margin, you may feel rich and be working with almost no real profit. If you want to strengthen these foundations, financial literacy for entrepreneurs starts with understanding these levels before making decisions.
How to calculate the profit margin of a product
In a real product there are more costs than the purchase price. For each unit, it is worth adding:
- The purchase or production cost.
- The associated shipping or logistics.
- Platform and payment fees.
- The advertising you spent to sell it.
- Its share of your overheads.
Rankia Business offers a very clear example: a lamp bought for €30 and sold for €80 has a gross margin of 62.5%. But when you add €8 of advertising, €6 of shipping, €3 of fees and €10 of overheads, the total cost rises to €57, the real profit is €23 and the margin drops to 28.75%. It is the same lamp, and the margin falls to less than half once you count everything.
That is why we recommend always calculating two margins per product: a gross one, to know whether the product works, and one with all costs allocated, to know whether it is worth continuing to sell it.
How to reach a 20% or 30% margin
The typical question is “how do I calculate a 20% margin?” The answer is a single formula:
Price = cost / (1 − desired margin)
Applied to different cases:
| Cost | Target margin | Calculation | Selling price |
|---|---|---|---|
| €100 | 30% | 100 / 0.70 | €142.86 |
| €200 | 25% | 200 / 0.75 | €266.67 |
| €10 | 25% | 10 / 0.75 | €13.33 |
| €80 | 20% | 80 / 0.80 | €100 |
The first three cases match the price examples published by HubSpot, which shows that adding 30% to a €100 cost gives a real margin of 23.08% and that for an exact 30% you have to divide by 0.70.
A quick check: at €142.86, profit is €42.86 and 42.86 / 142.86 = 30%. If you sell through an online shop in Spain, apply VAT afterwards: with a price before VAT of €100 and a 21% VAT, the customer pays €121, but your margin is still measured on the €100.
What margin is appropriate?
There is no universal ideal margin. It varies greatly by industry, type of product and competition, as HubSpot explains. A comfortable margin in an accessories shop may be unviable in a service with a heavy overhead structure. The useful benchmark is your own: does it cover your fixed costs, leave something to reinvest and pay you? To answer that with numbers, also calculate your break-even point.
Common mistakes when calculating margins
- Confusing margin with markup. This is the costliest mistake: you set prices thinking of a 30% margin and collect 23%.
- Forgetting your own time. If you do the service yourself, your hour is a cost. Without it, the margin is an illusion.
- Ignoring fees and returns. Every payment gateway, marketplace or return eats into your profit.
- Using prices with VAT. As we saw: VAT is not part of your income.
- Looking only at gross margin. It tells you whether the product is good, not whether the business is sustainable.
- Mixing criteria. Comparing a product with shipping included against one without it leads to wrong decisions.
How to use margin to decide better
Calculating margin is the first step. What is valuable is using it to decide. A margin on its own is misleading, so it is worth interpreting it alongside the other indicators. This is the practical reading of each level:
- Gross margin: use it to review purchase prices, production costs or discounts. If it falls, look at your suppliers or your promotions.
- Operating margin: use it to evaluate processes, staff and overhead costs. If it falls while the gross margin holds up, the problem is inside the business.
- Net margin: use it to see the final result after taxes and interest.
The Institute of Business of the Chamber of Commerce connects this to a broader concept in its guide to business profitability for SMEs: economic return breaks down into profit margin multiplied by asset turnover. In other words, you can improve in two ways: by increasing the margin, either by cutting costs or raising prices, or by selling more with the same resources.
In practice, for a small business this translates into a simple routine:
- Calculate the margin of each product or service with all its costs.
- Sort them from highest to lowest margin.
- Decide where to focus your sales effort: the highest-margin items deserve more promotion.
- Adjust prices or costs on those that fall below your target.
- Repeat the review every quarter or whenever a major cost changes.
This habit of measuring, deciding and adjusting is the heart of agile execution: small cycles, clear data and fast decisions. Before launching a new offer, you can also sketch its economic logic on a Canvas business model template, where the cost structure and revenue sources sit side by side.
Frequently asked questions
What does profit margin mean?
It is the percentage of the selling price that remains as profit once the cost considered is subtracted. With a price of €20 and a cost of €15, the profit margin is 25%. The higher it is, the more you keep from each sale.
What is the difference between margin and profit?
Profit is an amount in euros: revenue minus costs. Margin expresses that profit as a percentage of the selling price. With a €20 sale price and a €15 cost, profit is €5 and the margin is 25%.
How do you calculate a 20% margin?
Divide the cost by 0.80. If a product costs you €80, the selling price is €100 and you keep €20, which is 20% of the price. Adding 20% to the cost is not enough, because that would give a lower margin of 16.7%.
How do you calculate a 30% margin?
Divide the cost by 0.70. With a cost of €100, the price is €142.86 and the profit of €42.86 equals 30% of that price. If you only added 30% to the cost, you would get €130 and a margin of 23.08%.
What is a good profit margin?
It depends on the industry, the type of product and the competition, so there is no single figure that works for everyone. A good margin is one that covers your fixed costs, lets you reinvest and pays for your work. Calculate it with all your costs to see where you stand.
Next step
Move from “I think I'm making money” to “I know how much I make”. Check the examples in this guide with your own data in the profit margin and selling price calculator and explore the rest of the free tools for entrepreneurs to validate ideas and plan your project.
Sources
- Profit margin: what it is and how to calculate it (Rankia Business)
- 14.1: Analysis of financial statements (OpenStax, LibreTexts)
- Twenty-five years of business profits in Spain (Funcas)
- Business profit: definition and key types (Asest)
- How to calculate profit margin: formula and examples (Ideiatek)
- How to calculate a product's price: formulas and examples (HubSpot)
- What profit margin is, how to calculate it and the formula (HubSpot)
- SMEs and business profitability (Institute of Business, Chamber of Commerce)
Frequently asked questions
What does profit margin mean?
It is the percentage of the selling price that remains as profit once the cost considered is subtracted. With a price of €20 and a cost of €15, the profit margin is 25%. The higher it is, the more you keep from each sale.
What is the difference between margin and profit?
Profit is an amount in euros: revenue minus costs. Margin expresses that profit as a percentage of the selling price. With a €20 sale price and a €15 cost, profit is €5 and the margin is 25%.
How do you calculate a 20% margin?
Divide the cost by 0.80. If a product costs you €80, the selling price is €100 and you keep €20, which is 20% of the price. Adding 20% to the cost is not enough, because that would give a lower margin of 16.7%.
How do you calculate a 30% margin?
Divide the cost by 0.70. With a cost of €100, the price is €142.86 and the profit of €42.86 equals 30% of that price. If you only added 30% to the cost, you would get €130 and a margin of 23.08%.
What is a good profit margin?
It depends on the industry, the type of product and the competition, so there is no single figure that works for everyone. A good margin is one that covers your fixed costs, lets you reinvest and pays for your work. Calculate it with all your costs to see where you stand.
Related Posts
Keep exploring similar content that may interest you
How to Calculate the Selling Price of a Product (Margin vs Markup)
Calculate a product's selling price with one real example from start to finish: unit cost, margin vs markup, marketplace fees and VAT, without losing money.

Break-even point: formula, how to calculate it and examples
Learn the break-even point formula in units and in sales, with worked examples for a coffee shop, a freelancer and a store with several products.

Potential vs Real Market: How to Calculate Your Own Size
What the potential and real market are, how to narrow one to the other with filters and an example, and the four elements a market study should analyze.
Partnerships
Tools I use every day, on better terms for this community.