Ecommerce
Profit Margin Calculator
Get profit, margin and markup from your cost and selling price, or work backwards to the price that gives the margin you want.
Margin and markup are not the same
Both describe the same profit, measured against different numbers. Margin is profit as a share of the selling price. Markup is profit as a share of the cost. Mixing them up is one of the most common pricing errors, and it always errs in the same direction: you earn less than you think.
Profit = Selling price − Cost
Margin = Profit ÷ Selling price × 100
Markup = Profit ÷ Cost × 100
Example
- Cost
- $45
- Selling price
- $75
- Profit = 75 − 45
- $30
- Margin = 30 ÷ 75
- 40%
- Markup = 30 ÷ 45
- 66.7%
Pricing for a target margin
To hit a margin, divide the cost by one minus the margin. Adding the margin percentage to the cost does not work:
Price = Cost ÷ (1 − Target margin)
| Markup on cost | Resulting margin |
|---|---|
| 25% | 20% |
| 50% | 33.3% |
| 100% | 50% |
| 200% | 66.7% |
| 300% | 75% |
Margin and advertising
Your margin sets how hard your advertising has to work. At a 40% margin, ads must return at least 2.5× their cost just to break even. Check yours with the break-even ROAS calculator, then measure live campaigns with the ROAS calculator.
Common mistakes
Adding the margin % to cost
Cost $70 plus 30% is $91, which is a 23% margin, not 30%. For 30%, the price is 70 ÷ 0.7 = $100.
Leaving costs out of "cost"
If shipping, packaging and payment fees are not in the cost figure, the margin shown is a gross figure that overstates what you keep.
Comparing your margin with someone else’s markup
Suppliers and competitors often quote markup. Convert before comparing, or the numbers look far apart when they are not.
Frequently asked questions
What is the difference between margin and markup?
How do I price a product for a 30% margin?
Can margin be more than 100%?
Is this gross or net margin?
Last reviewed 2 October 2026. This tool runs in your browser; nothing you enter is stored or sent to Boostlix.