Saas MetricsAugust 29, 20268 min read

SaaS Gross Margin: How to Calculate and Benchmark It

SaaS gross margin is the percentage of subscription revenue remaining after subtracting the direct costs of delivering your product. Most SaaS companies target 70% to 85%. Calculate it by subtracting cost of goods sold from total revenue, then dividing by total revenue.

By Revenue Map Team

Dashboard showing SaaS gross margin calculation with revenue, COGS, and benchmark comparison metrics

SaaS gross margin is the percentage of subscription revenue left after subtracting the direct costs of delivering your software. For most SaaS companies, this number lands between 70% and 85%. Getting it right matters because gross margin sets the ceiling on how much you can spend acquiring customers, how quickly you reach profitability, and ultimately how investors will value your business.

What makes this metric especially dynamic right now is the speed at which AI agents are compressing SaaS delivery costs. According to SaaStr's coverage of Linear's latest milestones, 50% of the work created in Linear is now generated by agents, up from just 3% a year ago. The company reached cash flow positive status at a $2.5 billion valuation without raising new primary capital. That kind of operational efficiency shift has direct implications for how founders should think about their cost structures.

What Is SaaS Gross Margin?

Gross margin is the share of revenue remaining after you subtract the cost of goods sold (COGS). In traditional businesses, COGS means raw materials and manufacturing. In SaaS, it means the direct costs of running and supporting the product: servers, support staff, payment processing, and infrastructure operations.

Gross Margin (%) = (Revenue - COGS) / Revenue × 100

This is different from net margin, which subtracts everything (R&D, sales, marketing, G&A). Gross margin only captures the cost of delivery. A SaaS company with a 78% gross margin keeps $0.78 of every subscription dollar for operating expenses, growth investment, and profit.

Why does this one number carry so much weight? Because it feeds into nearly every downstream financial metric. Your LTV calculation depends on it. Your Rule of 40 score uses profit margin, which gross margin constrains. Your CAC payback period divides acquisition cost by gross-profit-adjusted ARPU. Overshoot your gross margin estimate by five points and every model built on top of it tells a misleading story.

What Counts as SaaS COGS?

Here's the thing: SaaS COGS is not as simple as "hosting bill." Founders routinely undercount it, which inflates their gross margin on paper and creates problems during due diligence.

Include in COGS:

Cost CategoryExamples
Hosting and infrastructureAWS/GCP/Azure compute, storage, CDN, bandwidth
Customer supportSupport team salaries, chat and ticketing tools, outsourced support
DevOps and SRESite reliability engineering team, on-call costs, monitoring tools
Payment processingStripe or Braintree fees, typically 2.5-3.5% of revenue
Third-party APIsAny API cost that scales with usage or customer count
Data costsDatabase hosting, data pipeline infrastructure

Do NOT include in COGS:

  • R&D and engineering (building new features, not running the product)
  • Sales and marketing
  • General and administrative (legal, accounting, office)
  • One-time infrastructure migration costs

The honest answer is that the line between "delivering the product" and "building the product" gets blurry. A DevOps engineer who spends 60% of their time on production infrastructure and 40% on developer tooling should have their cost split accordingly. Most seed-stage companies skip this allocation, and that is fine for internal planning. But if you are heading into a Series A, investors will want to see a defensible COGS breakdown.

How to Calculate Your SaaS Gross Margin

Step 1: Total Your Subscription Revenue

Use recurring revenue only. Exclude one-time implementation fees, consulting revenue, and hardware sales. Those have different cost profiles and should be tracked separately.

Step 2: Sum Your COGS

Pull every cost from the table above for the same period. Monthly is the most useful cadence for early-stage companies. Quarterly works for later-stage businesses with more stable cost structures.

Step 3: Apply the Formula

Worked example: SaaSCo has $200,000 in monthly recurring revenue with the following COGS:

  • Hosting: $18,000
  • Support team: $16,000
  • DevOps allocation: $8,000
  • Payment processing (2.9%): $5,800
  • Third-party APIs: $4,200
  • Total COGS: $52,000
Gross Margin = ($200,000 - $52,000) / $200,000 × 100 = 74%

That 74% is solid for a growth-stage company but leaves room for improvement, particularly on the hosting and support lines.

Calculate Your SaaS Gross Margin

SaaS Gross Margin Calculator

Enter your monthly revenue and cost of goods sold to calculate gross margin

$
$
Gross Margin
74%

Want to model this over 36 months with scenarios? Try Revenue Map free →

SaaS Gross Margin Benchmarks by Stage

Not every SaaS company should target 80%. Stage, pricing model, and delivery complexity all shift the benchmark.

Company StageTypical Gross MarginNotes
Pre-seed / MVP55-70%Higher support burden per customer, unoptimized infrastructure
Seed65-75%Starting to achieve hosting efficiency at moderate scale
Series A70-80%Investors expect this range for a fundable SaaS company
Series B and later75-85%Operational maturity, economies of scale in infrastructure
Public SaaS (median)72-78%Wide range depending on delivery model complexity

A few patterns worth noting. Usage-based pricing models tend to carry slightly lower gross margins because infrastructure costs scale more directly with consumption. Vertical SaaS serving regulated industries (healthcare, finance) often carries higher support costs, which compresses margins by 5-10 points. And AI-native SaaS companies face a unique challenge: GPU compute costs can push COGS significantly higher than traditional SaaS, which is why tracking AI startup unit economics requires its own framework.

How AI Agents Are Reshaping SaaS COGS

The Linear story is worth paying attention to because it illustrates a structural shift, not just a one-company anomaly.

When 50% of the work in a platform is agent-generated, the human labor component of delivering that product drops substantially. Customer support tickets get resolved by AI before a human sees them. Internal workflows that used to require dedicated operations staff now run autonomously. SaaStr also reported that one B2B company's agents wrote 40GB of data into Salesforce and built a renewal agent in half a day, replacing work that previously required multiple full-time employees.

For founders building financial models today, this creates a practical question: should you model declining COGS as a percentage of revenue over time? If you plan to deploy AI agents for support, onboarding, or operations, the answer is probably yes. But be specific. "We'll automate support" is a hope. "AI resolution rate will reach 40% of L1 tickets by Q3, reducing support headcount by 1.5 FTEs at $65K loaded cost" is a model assumption you can actually track and defend.

When projecting these improvements in your SaaS financial model, build separate COGS line items for human labor and AI compute costs. That way, as agent adoption grows, your model captures both the savings and the new expenses (API calls, model hosting) rather than assuming pure cost reduction.

Common Mistakes That Inflate Gross Margin

  1. Excluding support headcount. If your support team's salaries are buried in "operating expenses," your gross margin looks better than it is. This is the most common mistake and the one investors catch first.

  2. Ignoring payment processing fees. At 2.5-3.5% of revenue, these fees are real COGS. A company with $500K MRR is spending $12,500-$17,500 per month on payment processing alone.

  3. Counting professional services revenue at SaaS margins. Implementation and consulting revenue typically carries 30-50% gross margins. Blending it with subscription revenue artificially inflates your overall margin. Report them separately.

  4. Forgetting infrastructure costs that don't show up on the cloud bill. Monitoring tools, log management, CDN overages, and data egress fees add up. Audit your full infrastructure spend quarterly.

Key Takeaways

  • SaaS gross margin measures the percentage of subscription revenue remaining after direct delivery costs. Most healthy SaaS companies target 70-85%.
  • COGS includes hosting, support, DevOps, payment processing, and third-party APIs. It does not include R&D, sales, or G&A.
  • AI agents are compressing SaaS COGS by automating support, operations, and workflows. Model this as a declining COGS percentage over time if you plan to deploy agents.
  • Investors scrutinize gross margin during due diligence. Overstating it by excluding support headcount or payment processing fees erodes trust during fundraising.
  • Track gross margin monthly and benchmark against companies at your stage, not against mature public SaaS companies.

Gross margin is one number, but it sits at the foundation of your entire SaaS unit economics stack. Get it right and every metric downstream tells an accurate story. Start building your SaaS financial model with Revenue Map to see how gross margin flows through your projections, LTV calculations, and fundraising targets.

Related Articles