How to use this profit margin calculator
Choose what you know. With cost and selling price, the calculator returns your gross margin, profit per unit and markup. With cost and target margin, it works backward to the price you need to charge. "Cost" here means what one unit costs you — materials or wholesale price, inbound freight, packaging — not rent or salaries, which belong in a break-even analysis.
Margin vs markup
Both compare the same profit with a different base, which is why they are so often mixed up:
- Gross margin = profit ÷ selling price. It answers "what share of every sales dollar do I keep?"
- Markup = profit ÷ cost. It answers "how much did I add on top of what I paid?"
When you make a profit the price is always larger than the cost, so margin is always the smaller number. A 50% margin requires a 100% markup, and a 50% markup produces only a 33.3% margin. Margin can never reach 100% — that would mean the item cost nothing — while markup has no ceiling.
The formulas
Profit = price − cost
Gross margin % = (price − cost) ÷ price × 100
Markup % = (price − cost) ÷ cost × 100
Price for a target margin = cost ÷ (1 − margin ÷ 100)
Worked example
You buy a lamp wholesale for $40 and sell it for $65. Profit is $25. Margin = 25 ÷ 65 = 38.46%. Markup = 25 ÷ 40 = 62.5%.
Now say you want a 35% margin on the same lamp. Price = 40 ÷ (1 − 0.35) = 40 ÷ 0.65 = $61.54. Check: (61.54 − 40) ÷ 61.54 ≈ 35%.
The most common pricing mistake
Adding the margin percentage to the cost does not give you that margin. $40 plus 35% is $54, but (54 − 40) ÷ 54 is only 25.93%. To hit a margin you divide by (1 − margin); multiplying by (1 + margin) is a markup. The gap grows with the target: cost plus 50% yields a 33.3% margin, not 50%.
Selling price needed for common margins
For an item that costs $40:
| Target margin | Selling price | Markup | Cost multiplier |
|---|---|---|---|
| 20% | $50.00 | 25% | × 1.25 |
| 25% | $53.33 | 33.33% | × 1.33 |
| 30% | $57.14 | 42.86% | × 1.43 |
| 40% | $66.67 | 66.67% | × 1.67 |
| 50% | $80.00 | 100% | × 2 |
| 60% | $100.00 | 150% | × 2.5 |
The cost multiplier works for any cost: to get a 40% margin, multiply the cost by 1.67.
Gross margin vs net margin
This calculator gives gross margin: only the direct cost of the item is subtracted. Net margin also subtracts overhead — rent, payroll, marketing, software, interest and taxes — and is always lower. A product can show a healthy gross margin while the business still loses money if sales volume is too small to cover fixed costs.
Typical margins differ enormously by industry. Grocery stores work on thin margins and high volume, while software and consulting firms carry high gross margins. Compare yourself with businesses like yours rather than chasing a universal "good" number.
Frequently asked questions
What is a good profit margin?
It depends on your industry and overhead. Your gross margin has to cover every operating expense and still leave a profit, so a useful floor is your overhead as a percentage of sales. If overhead eats 30% of revenue, a 30% gross margin only breaks even.
Can profit margin be more than 100%?
No. Gross margin is profit divided by price, and profit can never exceed the price unless the cost is negative. Markup, which divides by cost, can be any size — 300% markup is a 75% margin.
How do I convert margin to markup?
Markup = margin ÷ (1 − margin); margin = markup ÷ (1 + markup), using decimals. A 40% margin is 0.40 ÷ 0.60 = 66.7% markup. The markup calculator has a full conversion table.
What costs should I include in cost per unit?
Include everything you pay for each additional unit sold: product or materials, inbound shipping, packaging, payment processing fees and marketplace commissions. Leaving out per-sale fees is a common reason real margins come in below the spreadsheet.
What does a negative margin mean?
You are selling below cost, so each sale loses money. This sometimes happens on purpose with loss leaders, but it should be a deliberate choice rather than a pricing error.
Last updated: October 8, 2026