๐ Profit Margin Calculator: Margin, Markup and Selling Price
By Shihab Mia ยท Reviewed by ToolNimba Review Team, Finance content reviewers ยท Updated 2026-07-13
This calculator gives gross figures for general information only and is not professional financial, accounting or tax advice. Your real profit depends on operating costs, taxes and fees, so check with a qualified adviser for decisions that matter.
All figures are gross (revenue minus cost of goods). They do not include operating expenses, tax, shipping or fees, so your net profit will be lower.
This profit margin calculator has two modes. Enter your selling price and cost and it returns your gross profit, your profit margin as a percentage, and your markup as a percentage. Or switch modes, enter your cost and a target margin, and it works backwards to the selling price you need. As a quick benchmark: a product that sells for 100 and costs 60 earns 40 in gross profit, which is a 40% profit margin and a 66.67% markup. Margin and markup are not the same number, and mixing them up is the single most common pricing mistake, so this tool always shows both.
What is the Profit Margin Calculator?
Profit margin is the share of your selling price that is left over as profit after you subtract the cost of the item. The formula is gross profit divided by revenue, times 100. If you sell something for 100 that cost you 60, your gross profit is 40, and 40 divided by 100 is 0.40, or a 40% margin. Margin is always measured against the selling price, so it can never exceed 100%. A product with a 40% margin keeps 40 cents of every sales dollar as gross profit and spends the other 60 cents covering its cost.
Markup answers a different question: how much you added on top of the cost to reach your price. The formula is gross profit divided by cost, times 100. On that same item, 40 of profit divided by 60 of cost is 0.667, or a 66.67% markup. Because cost is smaller than the selling price, the markup percentage is always larger than the margin percentage for the same product. This is exactly why the two get confused. A 50% markup is not a 50% margin. A 50% markup (multiply cost by 1.5) is actually a 33.3% margin, while a true 50% margin means doubling your cost, which is a 100% markup.
To go the other way, from a target margin to a price, you cannot simply add the margin percentage to your cost. That would give you a markup, not a margin, and you would fall short. The correct formula is selling price equals cost divided by (1 minus margin as a decimal). For a 40% target margin on a 60 cost, that is 60 divided by (1 minus 0.40), which is 60 divided by 0.60, which is 100. Selling at 100 gives you exactly the 40% margin you wanted. This is the calculation Mode B runs for you, and it is where hand-pricing most often goes wrong because dividing by (1 minus margin) is not intuitive.
One important limit: everything here is gross margin, based only on revenue minus the direct cost of the product (its cost of goods sold). Your real business also pays rent, wages, marketing, shipping, payment processing fees and tax. Those turn gross profit into operating profit and then net profit, and net margin is always lower than gross margin. Use this calculator to price individual products and to compare items, then look at your full profit and loss statement to understand what you actually keep. A healthy gross margin can still produce a thin or negative net margin once overheads are counted.
When to use it
- Pricing a product by choosing a target profit margin and finding the exact selling price it requires.
- Checking the margin and markup on an item you already sell to see if it is priced well.
- Converting a supplier or wholesale markup into the true margin so you can compare offers fairly.
- Setting a consistent margin across a product range so each item pulls its weight.
- Sanity-checking a discount or promotion to see how far you can drop price before profit disappears.
- Comparing two products with different costs and prices on a like-for-like margin basis.
How to use the Profit Margin Calculator
- Pick a mode: "Find margin" if you know price and cost, or "Find price" if you know cost and a target margin.
- In Find margin mode, type your selling price (revenue) and your cost. Results update instantly.
- Read your profit margin, markup and gross profit. Margin is share of price, markup is share of cost.
- In Find price mode, type your cost and the margin percentage you want (below 100%) to get the price.
- Use Copy result to paste the full breakdown into a spreadsheet, quote or message.
Formula & method
Worked examples
You sell a product for 100 that costs you 60 to buy. You want its margin and markup.
- Gross profit = 100 - 60 = 40
- Profit margin = 40 / 100 x 100 = 40%
- Markup = 40 / 60 x 100 = 66.67%
Result: Gross profit 40, profit margin 40%, markup 66.67%.
An item costs you 60 and you want a 40% profit margin. What price do you set?
- Convert the margin to a decimal: 40% = 0.40
- Selling price = cost / (1 - margin) = 60 / (1 - 0.40)
- Selling price = 60 / 0.60 = 100
- Check: profit = 100 - 60 = 40, and 40 / 100 = 40%. Correct.
Result: Sell at 100 to earn a 40% margin (40 profit per unit).
Markup converted to the margin it actually produces
| Markup on cost | Price if cost is 100 | Resulting profit margin |
|---|---|---|
| 10% | 110 | 9.09% |
| 25% | 125 | 20.00% |
| 50% | 150 | 33.33% |
| 66.67% | 166.67 | 40.00% |
| 100% | 200 | 50.00% |
| 200% | 300 | 66.67% |
Selling price needed for a target margin on a cost of 60
| Target margin | Divide cost by | Selling price | Profit |
|---|---|---|---|
| 20% | 0.80 | 75.00 | 15.00 |
| 30% | 0.70 | 85.71 | 25.71 |
| 40% | 0.60 | 100.00 | 40.00 |
| 50% | 0.50 | 120.00 | 60.00 |
| 60% | 0.40 | 150.00 | 90.00 |
Common mistakes to avoid
- Treating markup and margin as the same number. A 50% markup is only a 33.3% margin, because markup is measured against cost while margin is measured against the higher selling price. Always confirm which one a supplier or report means before you compare.
- Adding the margin percentage to cost to set a price. Adding 40% to a 60 cost gives 84, which is only a 28.6% margin, not 40%. To hit a real margin you divide by (1 minus the margin), so 60 / 0.60 = 100. Use Find price mode to avoid this.
- Confusing gross margin with net margin. Gross margin only counts the direct cost of the product. It ignores rent, wages, marketing, shipping and fees. A strong gross margin can still leave little or no net profit once those are subtracted.
- Entering a target margin of 100% or more. A 100% margin would require an infinite price, since it means the cost is zero share of the price. Margins must stay below 100%. If you meant to double your cost, that is a 100% markup, which equals a 50% margin.
Glossary
- Revenue
- The selling price you receive for the item before any costs are taken out.
- Cost
- What the item costs you to make or buy, also called cost of goods sold (COGS).
- Gross profit
- Revenue minus cost. The money left before operating expenses, tax and fees.
- Profit margin
- Gross profit as a percentage of revenue. Measures how much of each sales dollar is profit.
- Markup
- Gross profit as a percentage of cost. Measures how much you added on top of cost to set the price.
- Net margin
- Profit as a percentage of revenue after all expenses, not just the product cost. Always lower than gross margin.
Frequently asked questions
How do I calculate profit margin?
Subtract cost from your selling price to get gross profit, then divide that by the selling price and multiply by 100. For a 100 price and 60 cost, gross profit is 40, and 40 / 100 x 100 is a 40% profit margin.
What is the difference between margin and markup?
Both use the same gross profit, but they divide it by different numbers. Margin divides profit by the selling price, while markup divides profit by the cost. Because cost is lower than price, markup is always the bigger percentage. The same item can be a 40% margin and a 66.67% markup at once.
How do I find the selling price for a target margin?
Divide your cost by (1 minus the margin written as a decimal). For a 40% margin on a 60 cost, that is 60 / (1 - 0.40) = 60 / 0.60 = 100. Do not just add 40% to the cost, because that produces a markup, not a margin, and undershoots your target.
Is a 50% markup the same as a 50% margin?
No. A 50% markup means multiplying cost by 1.5, which works out to only a 33.3% margin. A true 50% margin means doubling your cost, which is a 100% markup. Confusing the two is the most common pricing error.
Why can profit margin never be 100% or more?
Margin is profit divided by the selling price, and profit can never exceed the price it is part of. A 100% margin would mean the item cost you nothing. Markup has no upper limit, but margin is capped just below 100%.
Does this show gross or net profit margin?
It shows gross margin, based on revenue minus the direct cost of the product only. It does not subtract rent, wages, marketing, shipping, payment fees or tax. Your net margin, after all of those, will be lower, so use this for pricing and compare it against your full profit and loss statement.