Margin Calculator
Enter your cost and selling price. Get gross margin %, markup %, and profit per sale instantly — or switch to Target margin to reverse-solve the price you need. The clearest margin calculator on the web, with a side-by-side margin vs markup table.
Your numbers
Edit any field — results update as you type.
How to calculate margin
Subtract cost from selling price to get profit. Divide profit by selling price. Multiply by 100 for a percentage. ($30 − $20) ÷ $30 × 100 = 33.3% gross margin.
To work the other way — from a target gross margin to a price — divide your cost by (1 − margin ÷ 100). A $20 cost at a 40% target margin needs a $33.33 price. That's what the Target margin tab does.
Margin vs markup, side by side
| Markup | Margin | $20 cost → price |
|---|---|---|
| 20% | 16.7% | $24.00 |
| 25% | 20% | $25.00 |
| 50% | 33.3% | $30.00 |
| 75% | 42.9% | $35.00 |
| 100% | 50% | $40.00 |
| 150% | 60% | $50.00 |
| 200% | 66.7% | $60.00 |
Frequently asked
Related calculators
Selling price from cost and markup %, with margin equivalent.
OpenCost-plus pricing with retail and wholesale.
OpenMargin and markup are not the same number. Here's how to tell them apart, when to use each, and the conversion table you'll keep coming back to.
Openmargin = (price − cost) ÷ price
- Cost is fully loaded (materials, labor, overhead, packaging).
- Price excludes sales tax and platform fees.
- Margin is gross — operating expenses are not subtracted.
Last reviewed: 2026-09-18
Last reviewed: 2026-09-18