SaaS Gross Margin Calculator

Calculate SaaS gross margin by subtracting cost of goods sold (hosting, support, infrastructure) from revenue. Benchmark against 70-80% targets.

$
AWS, GCP, Azure
$
Support team & tools
$
Stripe, gateway fees
$
3rd-party APIs, data costs
$
SaaS Gross Margin
80.00%
Excellent (target: 70–80%)
Gross Margin
80.00%
(Revenue − COGS) / Revenue
Gross Profit
$4,000,000.00
From $5,000,000.00 revenue
Total COGS
$1,000,000.00
20.00% of revenue
COGS per $1 Revenue
$0.20
Gross profit: $0.80

COGS Breakdown

Cloud Hosting
$400,000.00 (8.00% of rev)
Customer Support
$350,000.00 (7.00% of rev)
Payment Processing
$150,000.00 (3.00% of rev)
Other COGS
$100,000.00 (2.00% of rev)

Margin Optimization Scenarios

Cost CategoryCurrent−10% → Margin−10% → Margin−10% → Margin−10% → Margin
Cut 10%Cut 20%Cut 30%Cut 50%
Cloud Hosting$400,000.0080.80%81.60%82.40%84.00%
Customer Support$350,000.0080.70%81.40%82.10%83.50%
Payment Processing$150,000.0080.30%80.60%80.90%81.50%
Other COGS$100,000.0080.20%80.40%80.60%81.00%

Margin at Scale (estimated)

RevenueEst. COGSGross Margin
$2,000,000.00$581,505.9170.92%
$5,000,000.00$1,000,000.0080.00%
$10,000,000.00$1,533,212.1684.67%
$20,000,000.00$2,393,068.8088.03%
$50,000,000.00$4,450,414.5191.10%
* Estimates assume sub-linear scaling for hosting and support costs
Planning notes, formulas, and examples

About the SaaS Gross Margin Calculator

SaaS gross margin measures how efficiently a company delivers its software after accounting for the direct costs of serving customers. Unlike traditional businesses where COGS includes physical materials and manufacturing, SaaS COGS primarily consists of cloud hosting and infrastructure, customer support salaries, payment processing fees, and third-party software costs embedded in the product.

Healthy SaaS companies typically achieve gross margins of 70–80%, significantly higher than most traditional industries. This high margin is what makes SaaS business models attractive to investors — it leaves substantial room for R&D investment, sales and marketing spend, and eventual profitability. Margins below 60% may signal over-reliance on manual services or inefficient infrastructure.

This calculator computes your SaaS gross margin with a detailed COGS breakdown, benchmarks your result against industry standards, and shows how each cost category contributes to your margin. Use it to identify the biggest opportunities for margin improvement and model the impact of cost optimizations.

When This Page Helps

Understanding your SaaS gross margin with granular COGS breakdown helps you identify exactly where money is going and what levers you have to improve profitability. This calculator separates hosting, support, and other COGS components so you can see which costs have the most impact and model targeted optimizations. It benchmarks your result against the 70–80% range that investors expect.

How to Use the Inputs

  1. Enter your total SaaS revenue (MRR × 12 or annual subscription revenue).
  2. Enter cloud hosting and infrastructure costs (AWS, GCP, Azure, etc.).
  3. Enter customer support costs (support team salaries and tools).
  4. Enter payment processing fees (Stripe, payment gateway costs).
  5. Enter any other COGS items (third-party APIs, data costs, DevOps staffing).
  6. Review your gross margin, gross profit, and COGS breakdown.
Formula used
SaaS Gross Margin (%) = (Revenue − COGS) ÷ Revenue × 100 SaaS COGS = Hosting + Support + Payment Processing + Third-Party Costs + DevOps Gross Profit = Revenue − COGS

Example Calculation

Result: Gross Margin = 80.0%

With $5M revenue and total COGS of $1M ($400K hosting + $350K support + $150K payments + $100K other), the gross profit is $4M. Gross margin is ($5M − $1M) ÷ $5M × 100 = 80.0%. This is at the high end of healthy SaaS range. Hosting represents 40% of COGS and is the primary target for optimization.

Tips & Best Practices

  • Target 70–80% gross margin for a healthy SaaS business; above 80% is excellent.
  • Cloud hosting is usually the largest COGS component — optimize with reserved instances, autoscaling, and architecture improvements.
  • Customer support costs scale with customer count; invest in self-service to improve margins at scale.
  • Payment processing typically costs 2–3% of revenue — negotiate better rates as volume grows.
  • Don't confuse COGS with OpEx — R&D, sales, and G&A are operating expenses, not COGS.
  • Track gross margin quarterly and by product line to spot trends and make targeted improvements.
  • Professional services revenue typically has much lower margins (10–30%) and can drag down blended SaaS margins.

Understanding SaaS COGS

The composition of SaaS COGS is fundamentally different from traditional businesses. There are no raw materials or manufacturing costs. Instead, the primary costs are cloud infrastructure (typically 20–40% of COGS), customer support (20–35%), payment processing (10–20%), and miscellaneous third-party costs. Understanding this breakdown is key to identifying optimization opportunities.

Margin Benchmarks by Company Stage

Early-stage SaaS companies (pre-$5M ARR) often have lower gross margins (55–70%) because fixed infrastructure costs haven't been amortized across a large customer base. Growth-stage companies ($5–50M ARR) should target 70–75%. Mature SaaS companies ($50M+ ARR) with efficient operations regularly achieve 75–85%. The improvement comes from economies of scale in hosting and support.

Impact on Valuation

Gross margin is a key factor in SaaS valuation multiples. Companies with 80%+ margins command significantly higher revenue multiples than those at 60%. Investors recognize that high-margin revenue converts more efficiently to free cash flow, making it more valuable per dollar. Every percentage point of margin improvement drops directly to the bottom line.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • SaaS COGS typically includes cloud hosting and infrastructure, customer support team costs, payment processing fees, third-party software costs embedded in the product, DevOps team costs directly related to production, and data costs. It excludes R&D, sales, marketing, and general administrative expenses.