Profit Margin Calculator — Gross Profit & Margin % Formula
Gross profit = price − cost; margin % = profit / price × 100. See how margin differs from markup, with worked examples — free finance calculator.
Inputs
Margin (%)
—
Where this formula comes from
Gross profit in currency is selling price minus cost. Margin percent divides that profit by the selling price: margin% = (price − cost) / price × 100.
Markup percent instead divides by cost: markup% = (price − cost) / cost × 100. A 50% markup is not a 50% margin.
Taxes, shipping, and discounts can change the effective price or cost. Enter the pair you intend to compare.
Common mistakes
- Swapping margin and markupSame profit dollars, different denominators — results diverge as margins grow.
- Using cost as the margin baseMargin divides by price; markup divides by cost.
- Ignoring returns and feesNet economics after fees need a fuller P&L than this gross view.
How to use this calculator
Enter cost and selling price to see profit and margin (profit ÷ selling price). Margin is not the same as markup (profit ÷ cost). A 50% markup on cost is a 33.3% margin on price — confusing the two mis-sets targets.
Use the same currency and the same cost definition (product cost only vs fully loaded). Shipping, fees, and returns change true margin even when the sticker math looks fine.
Zero or negative prices are edge cases: a free giveaway is not a margin event in the usual retail sense. If cost exceeds price, profit is negative and margin is negative — the tool should show that clearly for loss analysis.
Pair this page with markup and ROI calculators when you are setting prices from cost targets versus evaluating capital returns. Keep “margin” language consistent in spreadsheets so teammates do not mix bases.
Gross margin usually excludes operating overhead; net margin does not. Name which margin you computed when sharing the number so finance and marketing do not argue past each other.
Bundle pricing and BOGO promotions change effective selling price. Recalculate margin on the realized average selling price, not the list price alone.
Marketplaces deduct fees before you receive cash. If the sticker price is 40 and fees take 15%, your realized selling price for margin math is closer to 34, not 40. Recalculate with net proceeds when judging whether a SKU is viable.
Cost of goods should match the unit you sold. Averaging costs across sizes without weighting by units sold creates a fake margin. Use the cost lot that corresponds to the sale you are evaluating.
Frequently asked questions
- How do you calculate profit margin?
- Margin % = (profit / sell price) × 100, where profit = sell − cost.
- Is margin the same as markup?
- No. Markup divides profit by cost; margin divides profit by selling price. Same profit can yield different percentages.
- What if sell price is zero?
- Margin is undefined. Enter a positive selling price.
- Can margin be negative?
- Yes—if cost exceeds sell price, profit and margin are negative (a loss).