Profit Margin & Markup Calculator
Calculate gross margin, markup and profit from cost and price, or find the selling price for a target margin or markup.
Cost is what one unit costs you (cost of goods sold). Add other per-unit costs to see a net margin as well as the gross margin.
Calculated entirely in your browser — nothing you enter here is sent to a server.
Margin vs markup
Both describe the same profit, measured against a different base. Margin divides profit by the selling price; markup divides it by the cost. That is why they never match: a product that costs $60 and sells for $100 has $40 of profit, a 40% margin ($40 ÷ $100) and a 66.67% markup ($40 ÷ $60).
Gross margin = (price − cost) ÷ price × 100Markup = (price − cost) ÷ cost × 100Price for a target margin = cost ÷ (1 − margin)Markup = margin ÷ (1 − margin)andmargin = markup ÷ (1 + markup)
Worked examples
Pricing for a target margin. A product costs $75 and you want a 25% margin. Adding 25% to the cost gives $93.75, which is only a 20% margin. The correct price is $75 ÷ (1 − 0.25) = $100. Choose "I know the cost and want a target margin" above to do this directly.
Gross vs net margin. At a $60 cost and $100 price, adding $15 of other per-unit costs (shipping, payment fees, packaging) drops the net profit to $25, so the net margin is 25% while the gross margin stays 40%.
Things to watch
- A margin can never reach 100% unless the cost is zero, so the calculator rejects a target margin of 100% or more.
- Markup is undefined when the cost is $0; the calculator says so instead of showing an infinite number.
- A price below cost gives a negative margin and markup — the result is shown as a loss per unit.
- For advertising, the margin you calculate here sets your break-even return on ad spend; see the break-even ROAS calculator.