How to use this calculator
- Choose which two numbers you already know: cost and price, cost and margin, or price and margin.
- Enter them. Cost is what one unit costs you to make or buy; price is what the customer pays (before sales tax).
- Read the result: your gross margin, the selling price you need, or the most you can pay for the item. Your markup and profit per unit appear alongside it.
- To go beyond gross margin, switch Margin type to Operating & net. Enter how many units you sell in a period, your operating expenses for that period (rent, salaries, marketing, software) and your interest and income taxes. You’ll get operating and net profit margin for the whole business.
The steps panel shows every calculation, and the table converts common margins into the markup and price you’d need for your cost.
The profit margin formula
Gross profit margin is the share of each sale you keep after paying for the item itself:
Turn it around to find the price that hits a target margin, or the most you can pay for an item at a fixed price:
Markup uses the same profit but divides by cost instead of price, so the two convert directly: markup = margin ÷ (1 − margin), and margin = markup ÷ (1 + markup), with both written as decimals.
Worked example
You buy a product for $36 and sell it for $60.
- Gross profit: $60 − $36 = $24
- Gross margin: $24 ÷ $60 = 40%
- Markup: $24 ÷ $36 = 66.67%
Now suppose you only know the cost and want a 40% margin. The price is $36 ÷ (1 − 0.40) = $36 ÷ 0.6 = $60.
The most common pricing mistake is to multiply the cost by 1 plus the margin. $36 × 1.40 = $50.40, and that price earns a margin of only 28.57%, not 40%. That’s a 40% markup. If you think in margins, always divide by (1 − margin).
Margin vs. markup table
For a $36 cost, here is the markup and selling price each gross margin requires:
| Gross margin | Markup | Selling price | Profit per unit |
|---|---|---|---|
| 10% | 11.11% | $40.00 | $4.00 |
| 20% | 25% | $45.00 | $9.00 |
| 25% | 33.33% | $48.00 | $12.00 |
| 30% | 42.86% | $51.43 | $15.43 |
| 33.33% | 50% | $54.00 | $18.00 |
| 40% | 66.67% | $60.00 | $24.00 |
| 50% | 100% | $72.00 | $36.00 |
| 60% | 150% | $90.00 | $54.00 |
| 75% | 300% | $144.00 | $108.00 |
| 80% | 400% | $180.00 | $144.00 |
The gap widens quickly. Up to about 20% the two numbers are close, but an 80% margin takes a 400% markup. If you set prices by markup, the markup calculator works the other way round and adds retail price endings.
Gross, operating and net margin
Gross margin tells you whether each sale is profitable. It doesn’t tell you whether the business is. For that you need two more levels:
- Operating margin = (gross profit − operating expenses) ÷ revenue. Operating expenses are the costs of running the business that don’t go into each unit: rent, salaries, marketing, software, insurance.
- Net margin = (operating profit − interest − income taxes) ÷ revenue. It’s what’s left of each sales dollar at the very end.
Example: you sell 2,000 units at $60 with a $36 unit cost. Revenue is $120,000 and cost of goods sold is $72,000, leaving $48,000 of gross profit (40%). Subtract $25,000 of operating expenses and operating profit is $23,000, a 19.17% operating margin. After $6,000 of interest and income taxes, net profit is $17,000, a 14.17% net margin.
If overhead grows faster than sales, net margin falls even while gross margin holds steady. That’s why the calculator shows all three.
What’s a typical margin?
Margins vary enormously by industry. Here are averages for U.S. public companies from NYU Stern professor Aswath Damodaran’s dataset, updated January 2026:
| Industry | Gross margin | Operating margin (pre-tax) | Net margin |
|---|---|---|---|
| Grocery and food retail | 26.31% | 2.29% | 1.32% |
| General retail | 33.18% | 6.80% | 5.61% |
| Specialty retail | 35.30% | 7.73% | 5.19% |
| Restaurants | 32.24% | 15.79% | 9.37% |
| Apparel | 56.88% | 9.11% | 3.85% |
| Software | 71.72% | 32.98% | 25.49% |
| All U.S. companies | 37.76% | 12.82% | 9.74% |
These are large, mostly public companies, so a small business’s numbers can look quite different. Use them as a rough benchmark, not a target.
Tips for improving your margin
- Price from the margin you need, not from cost plus a habit. Decide what gross margin covers your overhead and profit goal, then use the cost-and-margin mode to set prices.
- Know your true unit cost. Include freight, packaging, payment-processing fees and returns. A cost that’s understated by a few dollars inflates every margin you calculate.
- Watch discounts. A 20% discount on a 40% margin product cuts the margin to 25%, because the cost doesn’t change. The discount calculator shows the sale price, and you can enter it here to see the new margin.
- Track net margin monthly. Small increases in overhead quietly eat into net profit even when sales grow.
Assumptions and limitations
Prices are before sales tax, which you collect for the state and don’t keep. All three margin levels use one average cost and price per unit; if you sell many products at different margins, calculate each one or use totals from your income statement. Net margin here uses the interest and taxes you enter; it doesn’t calculate income tax for you.
Sources
- Aswath Damodaran, NYU Stern: Operating and Net Margins by Sector (US), January 2026
- U.S. Small Business Administration: Manage your finances
This calculator is for planning and education. For tax or accounting decisions, check your figures with an accountant.
Frequently asked questions
What is the difference between margin and markup?
Both compare profit to something, but not the same thing. Margin divides profit by the selling price, while markup divides profit by the cost. A product that costs $36 and sells for $60 earns $24, which is a 40% margin but a 66.67% markup, so markup is always the bigger number for a profitable sale.
How do I price a product for a 30% margin?
Divide the cost by 1 minus the margin as a decimal. For a $70 cost, $70 ÷ 0.70 = $100, and $30 of that $100 is profit, exactly 30%. Multiplying the cost by 1.30 instead gives $91, which is only a 23% margin.
What is a good profit margin?
It depends on the industry. In January 2026 data on U.S. public companies, grocery retailers kept about 1.3% of sales as net profit while software companies kept about 25.5%. Compare your margins with businesses like yours, and track your own trend over time.
What's the difference between gross margin and net margin?
Gross margin only subtracts the direct cost of the goods you sold. Operating margin also subtracts overhead like rent, payroll and marketing, and net margin subtracts interest and income taxes too. A business can have a healthy gross margin and still lose money if its overhead is too high.
Can a profit margin be more than 100%?
No. Margin is profit as a share of the price, and profit can never exceed the price unless the cost is negative. Markup has no ceiling, though, and a 400% markup is the same as an 80% margin.
What markup gives a 50% margin?
A 100% markup, which is doubling the cost. Retailers call this keystone pricing. In general, markup = margin ÷ (1 − margin), so a 25% margin needs a 33.33% markup and a 60% margin needs a 150% markup.
Updated November 2026. Results are estimates for educational purposes and depend on the inputs you provide.