How to use this margin calculator
- Choose what you know. “Cost + price” works as a gross margin and markup calculator: it returns the margin, markup and profit. “Cost + margin” or “Cost + markup” gives the selling price. “Price + margin” gives the most you can pay for the item.
- Enter amounts per unit, before sales tax. Sales tax imposed on the buyer that you collect and turn over to the state is generally not included in your gross receipts (IRS Publication 334), so leave it out of the price. The sales tax calculator handles it separately.
- Add a number of units if you want totals for revenue, cost and gross profit. Leave it blank for a single unit.
- Read the results: the margin and markup, the split of the price between cost and profit, and a price ladder showing common margins on your cost.
Margin and markup formulas
Gross profit is what is left of the selling price after the cost of the item. Margin and markup both turn that profit into a percent, but they divide it by different numbers. (This page is about profit margin on goods and services, not a brokerage margin account.)
Margin = (P − C) ÷ P
- P
- selling price per unit
- C
- cost per unit
- P − C
- gross profit per unit (multiply the result by 100 for a percent)
Markup = (P − C) ÷ C
- P
- selling price per unit
- C
- cost per unit
Worked example
An item costs C = $50.00 and sells for P = $80.00. The gross profit is $80.00 − $50.00 = $30.00. Margin = $30.00 ÷ $80.00 = 37.5%. Markup = $30.00 ÷ $50.00 = 60%. Sold in a batch of 100, the same item brings in $8,000.00 and leaves $3,000.00 in gross profit.
What is the difference between margin and markup?
Both describe the same profit; they just measure it against a different base. Margin asks “what share of the selling price do I keep?” Markup asks “how much did I add on top of what it cost me?” Because the price is bigger than the cost, margin is always the smaller percentage when the profit is positive.
Why a 50% markup is not a 50% margin
Buy an item for $50.00 and add a 50% markup: you charge $50.00 × 1.5 = $75.00. The profit is $25.00, which is $25.00 ÷ $75.00 = 33.33% of the price. To keep a true 50% margin on the same cost you would charge $100.00, a 100% markup.
The classic pricing mistake is to “mark up” by the margin you want. Adding 40% to a $50.00 cost gives $70.00 and only a 28.57% margin. The price that actually earns 40% is $83.33.
Margin to markup conversion table
To switch between the two, use these conversions. Margin must stay below 100%; a markup can be any size.
Markup = m ÷ (1 − m)
- m
- margin as a decimal, such as 0.4 for 40%
Margin = k ÷ (1 + k)
- k
- markup as a decimal, such as 0.5 for 50%
Markup needed for each margin, with the price that results on an item that costs $100:
| Margin | Equivalent markup | Price on a $100 cost |
|---|---|---|
| 10% | 11.11% | $111.11 |
| 15% | 17.65% | $117.65 |
| 20% | 25% | $125.00 |
| 25% | 33.33% | $133.33 |
| 30% | 42.86% | $142.86 |
| 35% | 53.85% | $153.85 |
| 40% | 66.67% | $166.67 |
| 45% | 81.82% | $181.82 |
| 50% | 100% | $200.00 |
| 55% | 122.22% | $222.22 |
| 60% | 150% | $250.00 |
| 65% | 185.71% | $285.71 |
| 70% | 233.33% | $333.33 |
| 75% | 300% | $400.00 |
| 80% | 400% | $500.00 |
And the margin you actually earn from each markup:
| Markup | Equivalent margin | Price on a $100 cost |
|---|---|---|
| 10% | 9.09% | $110.00 |
| 20% | 16.67% | $120.00 |
| 25% | 20% | $125.00 |
| 30% | 23.08% | $130.00 |
| 40% | 28.57% | $140.00 |
| 50% | 33.33% | $150.00 |
| 60% | 37.5% | $160.00 |
| 75% | 42.86% | $175.00 |
| 100% | 50% | $200.00 |
| 150% | 60% | $250.00 |
| 200% | 66.67% | $300.00 |
How to price for a target margin
Start from the cost and the margin you want, and divide by what is left of each sales dollar after the margin:
P = C ÷ (1 − m)
- C
- cost per unit
- m
- target margin as a decimal
- P
- selling price per unit
For a $50.00 cost and a 40% margin: P = $50.00 ÷ (1 − 0.4) = $83.33, a gross profit of $33.33 and a 66.67% markup. Round the price up to the next cent or price point so the margin doesn’t slip below your target.
Working backward, the most you can pay for an item is its price times one minus the margin. If it will sell for $80.00 and you want a 40% margin, your cost can be at most $80.00 × (1 − 0.4) = $48.00. Use “Price + margin” in the calculator for this.
Selling price by cost and target margin:
| Cost | 20% margin | 30% margin | 40% margin | 50% margin | 60% margin |
|---|---|---|---|---|---|
| $10 | $12.50 | $14.29 | $16.67 | $20.00 | $25.00 |
| $25 | $31.25 | $35.71 | $41.67 | $50.00 | $62.50 |
| $50 | $62.50 | $71.43 | $83.33 | $100.00 | $125.00 |
| $100 | $125.00 | $142.86 | $166.67 | $200.00 | $250.00 |
| $250 | $312.50 | $357.14 | $416.67 | $500.00 | $625.00 |
| $500 | $625.00 | $714.29 | $833.33 | $1,000.00 | $1,250.00 |
How a discount changes your margin
A discount lowers the price but not your cost, so your profit and margin fall by more, in proportion, than the discount itself. Taking 20% off the $80.00 item sells it for $64.00, leaving $14.00 of profit and a 21.88% margin, down from 37.5%. The discount that wipes out the profit entirely equals your margin: at a 37.5% margin, selling 37.5% off means selling at cost. To work out the sale price for any percent off, use the percentage calculator.
| Discount | Sale price | Profit per unit | Margin |
|---|---|---|---|
| 0% | $80.00 | $30.00 | 37.5% |
| 10% | $72.00 | $22.00 | 30.56% |
| 20% | $64.00 | $14.00 | 21.88% |
| 30% | $56.00 | $6.00 | 10.71% |
| 37.5% (break-even) | $50.00 | $0.00 | 0% |
Gross, operating and net profit margin
“Profit margin” can mean profit measured at different points. The SEC’s guide to financial statements describes the steps on an income statement: sales at the top, then the cost of sales, which leaves “gross profit” (sometimes called “gross margin”). Subtracting operating expenses, such as administrative salaries and research costs, gives operating profit before interest and income tax. After income tax you reach the bottom line, net profit, also called net income or net earnings. Dividing each profit by revenue gives the gross, operating and net margins.
| Margin | Profit measured | Formula |
|---|---|---|
| Gross margin | Revenue minus cost of goods sold | (Revenue − cost of goods sold) ÷ revenue |
| Operating margin | Gross profit minus operating expenses | Operating income ÷ revenue |
| Net margin | After interest and income tax | Net income ÷ revenue |
This calculator reports gross margin, because all it knows is what the item costs and what it sells for. For a sole proprietor, IRS Publication 334 figures gross profit the same way: gross receipts minus returns and allowances give net receipts, and subtracting the cost of goods sold leaves gross profit, which you determine before deducting business expenses. Overhead, wages and taxes come out later, so your operating and net margins will be lower.
What is a good profit margin?
There is no single good margin; it depends on the industry and on whether you look at gross or net. One public reference is the sector table by Aswath Damodaran of NYU Stern. The January 2026 edition covers 5,994 firms. It lists a gross margin and a net margin (net income divided by sales) for each sector. Damodaran says a sector’s net margin uses the total net income and total sales of the firms in the sector, not a simple average of their margins.
| Sector | Firms | Gross margin | Net margin |
|---|---|---|---|
| Software (System & Application) | 309 | 71.7% | 25.5% |
| Apparel | 35 | 56.9% | 3.9% |
| Retail (Special Lines) | 94 | 35.3% | 5.2% |
| Retail (General) | 23 | 33.2% | 5.6% |
| Restaurant/Dining | 64 | 32.2% | 9.4% |
| Retail (Grocery and Food) | 15 | 26.3% | 1.3% |
| Food Processing | 78 | 23.2% | 2.8% |
| Auto & Truck | 33 | 10.4% | 1.3% |
| All sectors except financials | 4,822 | 34.4% | 8.6% |
Two things stand out. Gross margins run far above net margins: general retail kept 33.2% of sales after the cost of goods but 5.6% after all expenses, interest and taxes. And the ranges are wide, from 1.3% net for grocery retail to 25.5% for software. Treat these as context, not targets. They describe the firms in that dataset, so your own costs, prices and size can put you well above or below them. A more useful test is whether your gross margin covers your overhead, pays you, and still leaves something for growth.
What this calculator does not cover
- Gross margin only. It does not subtract rent, marketing, shipping, payment-processing fees, returns or income tax.
- One price at a time. A bundle, a tiered discount or a product mix needs each item worked out separately and the results added up.
- Labor and payroll. If employees make or sell the item, their pay and employer taxes are part of your real cost. The payroll calculator estimates employer payroll taxes and the total cost of an employee.
- Personal finances. To see whether the profit you earn covers your own monthly spending, try the budget calculator.
Frequently asked questions
How do you calculate profit margin?
Subtract the cost from the selling price, then divide the profit by the selling price. An item that costs $50.00 and sells for $80.00 earns $30.00, so its margin is $30.00 ÷ $80.00 = 37.5%. Multiply by 100 to show it as a percent. This is gross margin, because it counts only the cost of the item, not overhead or taxes.
What is the difference between margin and markup?
Margin divides profit by the selling price; markup divides the same profit by the cost. On the $50.00 item sold for $80.00, the $30.00 profit is a 37.5% margin and a 60% markup. When the profit is positive, markup is always the bigger number, and the gap widens as the profit grows.
Is a 50% markup the same as a 50% margin?
No. A 50% markup on a $50.00 cost sells for $75.00, which is a 33.33% margin. To earn a 50% margin on the same cost you must sell for $100.00, a 100% markup. Markup uses the cost as its base, and margin uses the selling price.
How do I calculate the selling price from cost and margin?
Divide the cost by one minus the margin. For a $50.00 cost and a 40% target margin, the price is $50.00 ÷ (1 − 0.4) = $83.33. Don’t multiply the cost by 1 plus the margin: that applies the percentage as a markup and leaves you with a lower margin than you wanted.
How do you convert margin to markup?
Divide the margin by one minus the margin: markup = margin ÷ (1 − margin). A 40% margin equals a 66.67% markup. Going the other way, margin = markup ÷ (1 + markup), so a 50% markup is a 33.33% margin. The conversion table on this page lists common pairs.
What is a good profit margin?
It depends on the industry and on which margin you measure. In NYU Stern’s January 2026 sector data, net margin was 9.4% for restaurants and 1.3% for grocery retail, while system and application software reached 25.5%. Compare your margin with your own costs and your industry, not with a single number.
Can a profit margin be negative or over 100%?
A margin is negative when you sell below cost: an item that costs $80.00 and sells for $50.00 has a -60% margin. It can’t reach 100% if the item has any cost, because the profit would have to equal the whole price. Markup has no such ceiling and can exceed 100%.
What is the difference between gross, operating and net profit margin?
They are profit measured at different stages, each divided by revenue. Gross profit is revenue minus the cost of goods sold. Operating profit then subtracts operating expenses, and net profit is what remains after interest and income tax. This calculator shows gross margin, because it only knows an item’s cost and price.