The formulas
profit = selling_price − cost_price gross_margin = profit ÷ selling_price × 100 markup = profit ÷ cost_price × 100 price for a target margin = cost_price ÷ (1 − margin_rate)
If the selling price is zero, margin can’t be calculated (it would mean dividing by zero), so the result shows “Not defined” instead of an error. The same applies to markup when the cost is zero.
Margin vs markup
| Cost | Price | Profit | Margin | Markup |
|---|---|---|---|---|
| $60 | $100 | $40 | 40% | 66.67% |
| $50 | $100 | $50 | 50% | 100% |
| $75 | $100 | $25 | 25% | 33.33% |
| $120 | $100 | −$20 | −20% | −16.67% |
A common pricing mistake is to add the target percentage to cost. Adding 40% to a $60 cost gives $84, which is a 28.6% margin, not 40%. Use the “Price for target margin” mode instead.
What to include in cost
For a realistic gross margin, include every direct cost of selling one unit: purchase price, packaging, shipping to you, and payment processing fees. The Stripe and PayPal calculators can estimate the fee to add. If you’re GST-registered, use GST-exclusive figures — the GST calculator can strip GST from a price.
Gross profit is not the same as net profit: rent, wages, software, advertising and income tax all come out of gross profit before you see a net result.