Learn how to calculate profit margin and markup, set a selling price from your cost and avoid the 'add 30%' mistake, with formulas and worked examples.
If you have ever added 30% to your cost and then wondered why your profit came out smaller than 30%, you ran into the most common pricing mistake in business: mixing up markup and profit margin. The two sound alike, both are percentages and both describe profit, but they measure that profit against different numbers. Confuse them and you can underprice every product you sell without noticing.
This guide shows you how to calculate profit margin and markup with simple formulas, how to set a selling price from your cost, and how to avoid the pricing traps that quietly eat into your profit. Every example uses real numbers, and you can check each one with the free Profit Margin Calculator, which runs entirely in your browser.
1. What Is Profit Margin?
Profit margin is the share of your selling price that you keep as profit. It answers one question: out of every 100 you charge, how much is left after paying for what you sold?
The formula is short:
Profit margin (%) = (Selling price - Cost) / Selling price × 100
Say you sell a backpack for $100 and it costs you $60 to buy or make. Your profit is $40, and your profit margin is 40 / 100 = 40%. Profit margin matters for three reasons:
- It lets you compare products of different prices on the same scale.
- It shows whether your business can absorb rent, salaries, ads and refunds.
- Banks, investors and buyers look at it first when they judge a business.
2. Gross, Operating and Net Margin: The Three Layers of Profit
"Profit margin" is not one number. Businesses track three layers, and each one subtracts more costs than the last.
| Margin type | Formula | What it tells you |
|---|---|---|
| Gross margin | (Revenue - COGS) / Revenue | How profitable your products are before overheads |
| Operating margin | (Gross profit - Operating expenses) / Revenue | How profitable your core operations are |
| Net margin | Net profit / Revenue | What is left after every cost, interest and tax |
COGS means cost of goods sold: the direct cost of materials, manufacturing or wholesale purchase for the items you actually sold. Here is a small online store over one year:
| Line | Amount | Margin |
|---|---|---|
| Revenue | $120,000 | 100% |
| COGS | $66,000 | |
| Gross profit | $54,000 | 45% |
| Operating expenses | $38,000 | |
| Operating profit | $16,000 | 13.33% |
| Interest and taxes | $4,000 | |
| Net profit | $12,000 | 10% |
This store has a healthy 45% gross margin but keeps only 10% as net profit. Most of the gap is operating expenses such as software, shipping, ads and salaries. When people say "profit margin" without more detail, they usually mean gross margin for a single product and net margin for a whole company. Always check which one is being discussed.
3. Markup vs Margin: What Is the Difference?
Markup is the percentage you add on top of your cost. Margin is the percentage of the selling price that is profit. The only difference is the number you divide by:
Markup (%) = (Selling price - Cost) / Cost × 100
Profit margin (%) = (Selling price - Cost) / Selling price × 100
Take the same backpack: cost $60, selling price $100, profit $40. The markup is 40 / 60 = 66.67%, while the margin is 40 / 100 = 40%. It is the same sale and the same profit, but two different percentages. For any profitable sale the margin is always lower than the markup, because the selling price is larger than the cost.
You can convert one into the other with two formulas, where the percentages are written as decimals (50% = 0.5):
Margin = Markup / (1 + Markup) and Markup = Margin / (1 - Margin)
For example, a 50% markup gives 0.5 / 1.5 = 33.33% margin. Margin can never reach 100% unless your cost is zero, but markup can go well above 100%.
4. How to Calculate Selling Price From Cost
There are two ways to set a price, and which one you use depends on what you already know.
Method A: start from a markup. Multiply the cost by (1 + markup). If a ceramic mug costs you $8 and you use a 50% markup, the price is $8 × 1.5 = $12. Your profit is $4 per mug and your margin is 4 / 12 = 33.33%.
Method B: start from a target margin. Divide the cost by (1 - margin). If you want a 50% margin on the same $8 mug, the price is $8 / 0.5 = $16. Your profit is $8 and your markup is 8 / 8 = 100%.
Method B is the safer choice when you have a profit goal, because it gives you the margin you want on the first try. If your supplier raises costs, simply re-run the formula. To test both methods without a spreadsheet, enter your cost and markup into the Profit Margin Calculator and compare the price, profit and margin it shows.
5. Markup to Margin Conversion Table
Keep this table close when you price products. The left pair shows the margin you really earn for a given markup. The right pair shows the markup you need for a target margin.
| Markup | Margin you earn | Target margin | Markup you need |
|---|---|---|---|
| 10% | 9.09% | 10% | 11.11% |
| 20% | 16.67% | 20% | 25% |
| 25% | 20% | 25% | 33.33% |
| 30% | 23.08% | 30% | 42.86% |
| 40% | 28.57% | 40% | 66.67% |
| 50% | 33.33% | 50% | 100% |
| 75% | 42.86% | 60% | 150% |
| 100% | 50% | 70% | 233.33% |
| 150% | 60% | 75% | 300% |
| 200% | 66.67% | 80% | 400% |
Notice how fast the required markup grows. To earn an 80% margin you need a 400% markup, which means selling at five times your cost.
6. The "Add 30%" Mistake: A Worked Example
A shop owner buys a product for $200 and decides to "add 30%". The price becomes $260 and the profit is $60. That feels like a 30% profit, but the margin is 60 / 260 = 23.08%. The owner earns less than planned on every sale.
If the goal was a true 30% margin, the price should be $200 / 0.7 = $285.71. The profit is then $85.71, which is exactly 30% of the price. The difference is $25.71 per unit, or roughly $25,700 for every 1,000 units sold. The mistake is invisible on any single sale and expensive over a year.
7. The Discount Trap: Why 10% Off Costs More Than 10% of Your Profit
Discounts reduce your price, but your cost stays the same, so the whole discount comes out of your profit. Consider a product that sells for $50 and costs $30.
| Scenario | Price | Profit | Margin |
|---|---|---|---|
| Full price | $50 | $20 | 40% |
| 10% off | $45 | $15 | 33.33% |
| 20% off | $40 | $10 | 25% |
A 10% discount cuts your profit by 25%, from $20 to $15. To earn the same total profit you must sell 20 / 15 = 1.33 times as many units, which is 33% more. A 20% discount halves your profit per unit, so you need to sell twice as many items just to stand still. Before you run a promotion, check what volume increase it requires and decide whether that is realistic.
8. Pricing a Service or Freelance Project
Margin works for services too. Suppose you quote a design project that needs 40 hours. Your internal cost is $25 per hour, so labor costs $1,000, and you pay $200 for tools and stock assets. Your total cost is $1,200.
If you want a 30% margin, the price is $1,200 / 0.7 = $1,714.29. Your profit is $514.29. If you had just added 30% to your cost, you would have quoted $1,560 and earned a margin of only 23.08%.
Remember to include the hours that nobody pays you for: meetings, revisions, invoicing and finding clients. Add them to your cost before you apply your target margin, or your real hourly rate will be far lower than you think.
9. Profit Margin Formulas for Excel and Google Sheets
Put your cost in cell A2 and your selling price in cell B2. The first formula below returns the profit margin, the second returns the markup, and the third returns the price you need for a 35% margin. Format the result cells as percentages or currency.
=(B2-A2)/B2
=(B2-A2)/A2
=A2/(1-0.35)Copy the formulas down the column to price an entire catalog. If you want to avoid sending your prices to a cloud service, a browser tool that works offline-first, such as ours, keeps your numbers on your own device.
10. How to Use the Tooltri Profit Margin Calculator
The calculator turns your cost and markup into a price, a profit and a margin in one step:
- Choose your currency so the numbers match your local market.
- Enter your cost per item, before any profit is added.
- Set your markup percentage and adjust it until the results look right.
- Read the selling price, the profit per unit and the gross margin.
- To hit a target margin, find it in the conversion table above, enter the markup shown and confirm the margin.
Your inputs stay in your browser and are never sent to a server, so you can test real supplier prices safely. When you are ready, open the Profit Margin Calculator and try your own numbers.
11. What Is a Good Profit Margin?
There is no single good number. A grocery store, a software company and a consultant all run on very different margins. Grocery and retail businesses often live on thin margins and depend on volume, while digital products and software can have much higher gross margins because the cost of each extra sale is low. Treat any published benchmark as a rough guide and look up figures for your own industry.
A more useful test is to compare your margin with these three things:
- Your own margin from last quarter and last year.
- Margins of similar businesses of your size.
- The margin you need to pay all your fixed costs and still make a profit.
12. Seven Common Profit Margin Mistakes
- Treating markup and margin as the same number.
- Calculating margin on revenue before returns, refunds and discounts.
- Leaving shipping, payment fees and packaging out of your cost.
- Ignoring your own unpaid time when you price services.
- Giving discounts without calculating the extra volume you need.
- Never updating prices when supplier costs rise.
- Comparing gross margin with net margin as if they were the same thing.
13. Frequently Asked Questions
What is the profit margin formula?
Profit margin is (Selling price - Cost) / Selling price × 100. Use revenue and total cost to get the same result for a whole business.
Is markup the same as profit margin?
No. Markup divides profit by cost, while margin divides profit by the selling price. A 50% markup equals only a 33.33% margin.
How do I calculate a selling price for a 40% profit margin?
Divide your cost by 0.6. If your cost is $120, the price is $120 / 0.6 = $200, which gives $80 profit and exactly a 40% margin.
Can profit margin be higher than 100%?
No. Margin tops out at 100% when the cost is zero. Markup can be higher than 100%, for example when you sell something for three times its cost.
What is the difference between gross margin and net margin?
Gross margin only subtracts the direct cost of the goods sold. Net margin subtracts every cost, including operating expenses, interest and taxes.
14. Conclusion: Price on Margin, Not on Guesswork
Markup is a handy way to build a price, but margin is the number that tells you what you actually keep. Decide on your target margin first, convert it into the price with the formulas above and test the result before you publish it. If you also run ads or invest in growth, pair this guide with our ROI Calculator and our CPM Calculator to see whether your marketing spend pays off after your margin is taken into account.
