How to calculate profit margin (with worked examples)
There are three margins you need to know. Most small businesses confuse them, optimize the wrong one, and end up making bad pricing decisions on incomplete information.
Gross margin: the starting point
Gross margin is the simplest version. It's the percentage of your selling price left over after subtracting the direct cost of the product (COGS — cost of goods sold).
Formula:
Gross margin = (Selling price − COGS) ÷ Selling price × 100
Example: a $50 product with $20 of COGS has a gross margin of (50 − 20) / 50 = 60%.
COGS includes the raw materials, manufacturing labor, and direct production costs. It does not include rent, marketing, salaries that aren't directly producing the product, or any general overhead.
Contribution margin: the operational metric
Contribution margin subtracts all variable costs per unit — COGS plus shipping, payment processing, sales commissions, and any other cost that scales with each sale.
Contribution margin = (Selling price − all variable costs) ÷ Selling price × 100
Example: the same $50 product, with $20 COGS, $4 shipping, $1.75 in payment processing (Stripe), and a $5 sales commission. Variable costs total $30.75. Contribution margin = (50 − 30.75) / 50 = 38.5%.
Why this matters: contribution margin is the dollar amount each sale contributes toward covering your fixed costs (rent, salaries, software). It's the right metric for pricing decisions and for understanding your unit economics.
Net margin: the bottom line
Net margin subtracts everything — variable costs, fixed costs, operating expenses, interest, taxes.
Net margin = Net income ÷ Revenue × 100
This is the percentage shareholders, lenders, and tax authorities care about. It's also the lowest of the three. A business with 60% gross margin might have 38% contribution margin and 8% net margin. All three numbers are correct and tell different stories.
A worked example: an Etsy candle business
Sarah sells candles on Etsy. One candle:
- Selling price: $25
- Materials (wax, wick, jar, label): $6
- Direct labor allocated: $2
- Etsy listing fee: $0.20
- Etsy transaction fee (6.5%): $1.63
- Payment processing (3%): $0.75
- Shipping (Sarah pays $4.50, customer pays $4): net $0.50
- Ad spend allocated: $2.50
Three margins:
- Gross margin: ($25 − $8) / $25 = 68%
- Contribution margin: ($25 − $13.58) / $25 = 45.7%
- Net margin (after $300/mo rent, $100/mo software, allocated across 50 candles/mo = $8/candle): ($25 − $21.58) / $25 = 13.7%
The 68% gross margin looks fantastic in isolation. The 13.7% net is what actually pays Sarah.
Which margin should you optimize?
It depends what decision you're making.
- Pricing a new product: contribution margin. You're answering "does each sale make money?"
- Comparing yourself to industry: gross margin. Benchmark data is almost always reported as gross.
- Evaluating overall business health: net margin. It's the truest measure of profitability.
- Setting growth targets: contribution margin, with a plan for how it covers fixed costs as you scale.
The most common margin calculation mistake
Treating gross margin as if it were net. A founder excited about "60% gross margins" who hasn't subtracted Stripe, shipping, ads, and rent is going to be disappointed when the bank balance doesn't match the spreadsheet. Always carry the calculation through to net before making decisions about how much you can spend on growth.
Quick reference
| Metric | Subtracts | Use for |
|---|---|---|
| Gross margin | COGS only | industry benchmarking |
| Contribution margin | all variable costs | pricing & unit economics |
| Net margin | everything | overall profitability |