New See exactly what you're overpaying AWS in under 60 seconds. Try the Calculator for free โ†’

Hello. How can we help you?

Searching...
Homeโ€บFAQโ€บFINOPS & CLOUD FINANCIAL OPERATIONSโ€บWhat Is Infrastructure Gross Margin and How Is It Calculated?

What Is Infrastructure Gross Margin and How Is It Calculated?

Infrastructure gross margin measures how much revenue a SaaS company retains after deducting the direct cost of delivering its product primarily cloud infrastructure spend. It is calculated by subtracting infrastructure costs (and other COGS components) from revenue, then dividing by revenue, expressed as a percentage. For SaaS companies, infrastructure gross margin is one of the most closely watched financial metrics because it directly determines how efficiently the business scales and how attractive it appears to investors.

 

How Infrastructure Gross Margin Is Calculated

The core formula is:

 

Infrastructure Gross Margin (%) = (Revenue โˆ’ Infrastructure COGS) รท Revenue ร— 100

 

In practice, infrastructure COGS includes cloud compute, storage, data transfer, managed database services, CDN costs, and any other infrastructure directly consumed to serve customers. It does not include sales, marketing, R&D, or general overhead.

 

Example: A SaaS company with $1,000,000 in monthly recurring revenue and $180,000 in infrastructure COGS has an infrastructure gross margin of 82%.

The table below shows how the calculation shifts at different cost levels:

Monthly Revenue Infrastructure COGS Gross Margin
$500,000 $100,000 80%
$1,000,000 $180,000 82%
$2,000,000 $500,000 75%
$5,000,000 $1,500,000 70%

 

What Counts as Infrastructure COGS

Not all cloud spend belongs in COGS. Only costs that are directly attributable to serving customers sometimes called “cost of revenue” belong in the gross margin calculation. Items that belong in COGS include: cloud compute for production workloads, managed database services (RDS, Cloud SQL, Aurora), storage directly consumed per customer, data egress and transfer costs tied to product usage, and third-party APIs billed per transaction.

 

Items that do not belong in COGS include: development and staging environments, internal tooling infrastructure, security scanning tools, and data pipeline costs for internal analytics. Misclassifying these inflates perceived COGS and understates your true gross margin, a common mistake when cloud bills are not tagged to their function.

 

Industry Benchmarks

SaaS investors and operators use gross margin as a proxy for business quality and scalability. The widely cited benchmarks are:

Gross Margin Range Signal
75%โ€“85% Healthy, typical for efficient SaaS businesses
65%โ€“74% Acceptable, improvement needed at scale
Below 65% Concerning, common at early stages or infrastructure-heavy products
85%+ Excellent, indicates strong infrastructure efficiency

Infrastructure-heavy products (real-time data processing, AI/ML inference, video streaming) naturally carry lower margins than lightweight SaaS. Context matters: a company processing petabytes of data at 70% gross margin may be performing well, while a simple CRM at 70% has a cost problem.ย 

 

Why Infrastructure Gross Margin Deteriorates at Scale

The most common cause of margin compression is infrastructure costs growing faster than revenue; a sign that the architecture or commitment strategy is not scaling efficiently. Specific drivers include: over-provisioned compute that was never rightsized, on-demand pricing used for predictable baseline workloads, untagged shared infrastructure that makes cost attribution impossible, and rising data transfer costs as customer data volumes grow.

 

Understanding cost per customer or cost per tenant is essential to diagnosing where margin is leaking. See our breakdown of cloud unit economics for a framework on attribution.

 

How Usage.ai Improves Infrastructure Gross Margin

Usage.ai helps SaaS companies reclaim gross margin by automating the two highest-impact levers: commitment management and rightsizing. The platform continuously analyzes production workloads, purchases Reserved Instances and Savings Plans at the right time, and eliminates overprovisioned compute reducing infrastructure COGS without requiring manual intervention from engineering teams. For companies where infrastructure costs are the primary drag on gross margin, Usage.ai typically delivers measurable improvement within the first billing cycle. See how Usage.ai works.