How to calculate SaaS gross margin

Gross margin is the share of revenue you keep after the costs of serving customers. It feeds LTV, break-even and runway, so it's worth getting right. The example company below is made up so the math is easy to follow.

The example

A small SaaS makes $10,000 MRR. Each month it pays $800 for hosting, $300 in payment fees, $900 for customer support and $500 for third-party APIs its product calls.

The formula

Cost of revenue = the costs of delivering the product to paying customers. $800 + $300 + $900 + $500 = $2,500.

Gross margin = (revenue − cost of revenue) ÷ revenue. ($10,000 − $2,500) ÷ $10,000 = 75%.

What counts as cost of revenue

When one person does both support and building, split their cost by rough time spent. Pick a rule and keep it the same every month so the trend means something.

Why it matters

LTV uses gross margin: LTV = ARPU × gross margin ÷ monthly churn. At $50 ARPU and 4% churn, a 75% margin gives $50 × 0.75 ÷ 0.04 = $937.50. At 85% it's $1,062.50. More on that: how to calculate LTV.

Break-even revenue is fixed costs ÷ gross margin. With $6,000 of fixed costs, a 75% margin needs $8,000 MRR, and an 85% margin needs about $7,059. See the SaaS break-even point.

Ways to improve it

Every formula in one place: SaaS metrics formulas.

Want the full model?

The Founder Unit Economics Pack ($39) is an Excel and Google Sheets workbook that uses your gross margin to work out LTV:CAC, payback, break-even and runway, with side-by-side scenarios.