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:

Three margins:

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.

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

MetricSubtractsUse for
Gross marginCOGS onlyindustry benchmarking
Contribution marginall variable costspricing & unit economics
Net margineverythingoverall profitability

Try the calculator

Free, no signup. Includes platform fees, shipping, and tax.

Open calculator →