Tech for CFO
All insightsGeometric illustration of ascending blocks with a rising arrow in teal and navy

June 10, 2026 · 6 min read · Tech for CFO

Gross Margin Analysis for SaaS: Pulling COGS, Usage, and Revenue Onto One Data Spine

Gross margin analysis is the practice of measuring how much revenue remains after the direct cost of delivering a product, then breaking that figure down by revenue stream, customer and product to find what drives it. For a SaaS company, gross margin equals revenue minus cost of revenue (COGS), divided by revenue.

The headline number is easy to compute from a profit and loss statement. The analysis is in the breakdown: which costs you put in COGS, how you split subscription from services, and which customers or products pull the blended figure down.

How to calculate SaaS gross margin

The formula is the same as for any business:

  • Gross profit = Revenue − Cost of revenue
  • Gross margin % = Gross profit ÷ Revenue × 100

For SaaS, calculate it at least three ways:

  1. Subscription gross margin: subscription revenue against the cost of running and supporting the software.
  2. Services gross margin: implementation, training and consulting revenue against the cost of the people who deliver it.
  3. Blended gross margin: everything together. This is what appears on the P&L, and it mixes two very different businesses.

Investors and lenders usually care most about subscription margin, because it shows what the recurring business earns once it scales. Blended margin can look weak simply because a company sells a lot of low-margin onboarding work.

What belongs in SaaS COGS

There is no single rulebook. SaaS Capital notes that "GAAP does not clearly define what should be included in a SaaS company's Cost of Sales," so classification is largely a company decision. That makes consistency more important than any one choice. SaaS Capital recommends including:

  • Hosting costs (for example, AWS)
  • Employee costs for keeping the production environment running
  • Customer support and customer success for the application, but not account management
  • Third-party software or data included in the delivered product
  • Other direct employee costs required to deliver the ongoing service

Common mistakes run in both directions. Leaving support salaries or payment-processing fees in operating expenses inflates gross margin. Putting all of engineering or account management into COGS understates it. Either way, the number stops being comparable with benchmarks or with your own prior periods.

Write the policy down: which general ledger accounts map to cost of revenue, how shared people (a DevOps engineer who also builds features) are split, and when the policy was last changed. Then apply it the same way every month.

Example: gross margin for a hypothetical B2B SaaS company

The figures below are for an illustrative company, not a real one. It booked $1,200,000 of revenue in a quarter: $1,050,000 subscription and $150,000 professional services.

Quarterly line itemSubscriptionServicesTotal
Revenue$1,050,000$150,000$1,200,000
Hosting$96,000—$96,000
Embedded third-party software$30,000—$30,000
Support and customer success$72,000—$72,000
Production operations staff$42,000—$42,000
Implementation staff—$120,000$120,000
Total COGS$240,000$120,000$360,000
Gross profit$810,000$30,000$840,000
Gross margin77.1%20.0%70.0%

The arithmetic:

  • Subscription COGS = $96,000 + $30,000 + $72,000 + $42,000 = $240,000. Gross profit = $1,050,000 − $240,000 = $810,000. Margin = $810,000 ÷ $1,050,000 = 77.1%.
  • Services gross profit = $150,000 − $120,000 = $30,000. Margin = $30,000 ÷ $150,000 = 20.0%.
  • Blended gross profit = $1,200,000 − $360,000 = $840,000. Margin = $840,000 ÷ $1,200,000 = 70.0%.

The blended 70% hides two facts. The recurring business earns 77 cents of gross profit per dollar, and the services arm barely covers its own delivery cost. If services grow faster than subscriptions, blended margin will fall even if nothing about the software changes. A board reading only the P&L would see a declining margin and might blame hosting.

How the benchmarks compare

Benchmarks are useful for a sanity check, as long as you compare like with like.

  • Bessemer Venture Partners' Scaling to $100 Million puts the average gross margin for a cloud business "regardless of maturity" at 65–70% and advises companies to "aim for 65–70% gross margins over time."
  • SaaS Capital reports that gross margins on SaaS license revenue in its portfolio and survey data "are generally 80% to 85%," using the narrower COGS definition above.
  • SaaS Capital's 2026 spending benchmarks, based on a survey of more than 1,000 private SaaS companies, put median hosting spend at 5% of ARR and other COGS at 3% of ARR.

The gap between 65–70% and 80–85% is mostly definitional. Bessemer is describing total gross margin of cloud companies; SaaS Capital is describing license (subscription) revenue only. Our example company sits inside both ranges: 70% blended, 77% subscription. Before you tell a board your margin is "below benchmark," confirm the benchmark measures the same thing you do.

Analyzing margin by customer and product

Company-level margin tells you whether there is a problem. Customer and product margin tells you where it is.

By customer. Revenue per customer is easy to pull from billing. Cost per customer is harder, because most hosting and support costs arrive as one invoice or one payroll line. Allocate them using a driver that reflects consumption: compute or storage usage for hosting, ticket volume or support hours for support. A customer paying a discounted rate while generating a large share of support tickets can run at a far lower margin than the average, and blended reporting will never show it.

By product or tier. If you sell several modules or pricing tiers, map revenue and the costs each one consumes separately. Usage-heavy features (data processing, AI inference, messaging) often carry variable costs that grow faster than the price charged for them.

By period. Track the trend monthly, not just the level. A margin that drops from 78% to 74% over three quarters usually has a specific cause: a vendor price increase, a new customer with unusual usage, or a reclassification. Find it while it is small.

Three practical rules make this analysis hold up:

  1. Use the same customer identifier everywhere. Billing, the general ledger (classes or customers in QuickBooks) and product usage data need a shared key, or every allocation becomes a manual matching exercise.
  2. Match periods. Recognized revenue, incurred costs and consumed usage must cover the same month. Annual prepayments and quarterly vendor invoices are the usual sources of mismatch.
  3. Restate when the policy changes. If you move support into COGS this year, restate prior periods so the trend line stays honest.

Connecting gross margin to cash

Gross margin feeds directly into contribution margin, CAC payback and runway. A four-point margin improvement on $4.2 million of annual subscription revenue (the example company's run rate) is $168,000 a year of additional gross profit. Whether that buys meaningful runway depends on burn; see our guide to cash runway tracking and the companion post on unit economics, which turns margin into payback periods.

A short gross margin checklist

  • Write and date a COGS policy that names each account mapped to cost of revenue.
  • Report subscription, services and blended margin separately every month.
  • Allocate hosting and support to customers with a usage-based driver at least quarterly.
  • Compare against benchmarks only after matching their definition.
  • Investigate any margin move of more than two points before the next board meeting.

To test your own numbers, run them through our free Gross Margin Analyzer. For a comparison of tools that track margin from QuickBooks data, see our profitability tools guide.

Tools that can help

Tech for CFO apps that put the ideas in this article to work on your own numbers.