Futureproof
All Terms

Gross Margin

Quick Definition

The percentage of revenue remaining after subtracting direct costs of delivering the product, before operating expenses.


What is Gross Margin?

Gross margin is the percentage of revenue remaining after subtracting the direct costs of delivering your product or service. It shows how efficiently you turn revenue into profit before operating expenses.

For SaaS companies, COGS typically includes hosting, third-party software costs, and customer support. Everything else (sales, marketing, R&D, G&A) comes after gross profit.

Why Gross Margin Matters

Gross margin determines how much money you have to run and grow the business. A company with 80% gross margin keeps $0.80 of every dollar for operations. A company with 50% gross margin only keeps $0.50.

High gross margins are a defining characteristic of great software businesses. They enable aggressive investment in growth while still generating profit. Low margins force difficult trade-offs.

How to Calculate Gross Margin Step by Step

Step 1: Calculate your total revenue for the period. Pull revenue from your billing system or accounting software. Use a monthly or quarterly period. Include only recognized revenue — not bookings or deferred revenue.

  • Total revenue (last quarter): $375,000

Step 2: Identify your Cost of Goods Sold (COGS). For SaaS, COGS includes the direct costs of delivering your product. This is where most founders struggle — you need to categorize expenses correctly.

Include in SaaS COGS:

  • Cloud infrastructure (AWS, GCP, Azure): $18,000
  • Third-party API costs (Twilio, SendGrid, data providers): $9,500
  • Customer support team salaries: $27,000
  • DevOps/infrastructure team salaries (portion): $15,000
  • Payment processing fees (Stripe's 2.9%): $10,875
  • Third-party software embedded in your product: $4,500
  • Total COGS: $84,875

Do NOT include in COGS:

  • R&D / engineering salaries (that's operating expense)
  • Sales and marketing (operating expense)
  • General and administrative (operating expense)
  • Office rent, legal, accounting (operating expense)

Step 3: Calculate Gross Profit and Gross Margin.

  • Gross Profit = $375,000 - $84,875 = $290,125
  • Gross Margin = $290,125 ÷ $375,000 = 77.4%

Step 4: Benchmark your result.

  • 80%+ gross margin: Excellent — typical of well-run SaaS
  • 70-80%: Good — check if you can optimize infrastructure costs
  • 60-70%: Below average — likely have a heavy services component or infrastructure bloat
  • Below 60%: Concerning for SaaS — may indicate a services business disguised as software

Step 5: Track the trend and find the levers. Gross margin should improve as you scale because infrastructure costs typically grow slower than revenue. If margin is declining, investigate:

  • Are hosting costs scaling linearly with users? (Consider architecture optimization)
  • Is customer support scaling with headcount instead of automation?
  • Are third-party API costs eating into margin? (Consider building in-house)

Common mistakes founders make:

  • Excluding customer support from COGS (investors will add it back)
  • Including R&D salaries in COGS (overstates cost, understates margin)
  • Not including payment processing fees (Stripe's 2.9% adds up fast)
  • Reporting gross margin without separating one-time revenue (services revenue has different margins)
  • Not tracking gross margin by product line or customer segment

Skip the spreadsheet. Futureproof categorizes your expenses automatically and calculates gross margin in real-time — properly separating COGS from operating expenses so your numbers match what investors expect.

Gross Margin Benchmarks

SaaS companies typically achieve 70-85% gross margins. Below 70% suggests infrastructure inefficiency or heavy services component. Above 85% is excellent. Ecommerce margins are much lower, typically 30-50%.

Formula

Gross Margin = (Revenue - Cost of Goods Sold) ÷ Revenue × 100

Or: Gross Margin = Gross Profit ÷ Revenue × 100

Example

SaaS company financials:

  • Revenue: $500,000
  • Hosting costs: $25,000
  • Third-party APIs: $15,000
  • Customer support: $35,000

COGS = $75,000

Gross Profit = $500,000 - $75,000 = $425,000

Gross Margin = $425,000 ÷ $500,000 = 85%

Strong margin typical of well-run SaaS.

Related

Related Terms

Further Reading

Learn More About Gross Margin

See These Metrics in Action

Futureproof automatically tracks MRR, ARR, churn, runway, and more — so you can stop calculating and start scaling.