Home/Library/Gross Margin and COGS in SaaS
Explainer · CFO · Updated May 2026

Gross Margin and Cost of Goods Sold in SaaS

For a SaaS business, cloud infrastructure is usually the largest line in cost of goods sold, which makes it the single biggest lever on gross margin. Understanding how cloud cost lands in COGS, and what it does to margin, is the difference between a healthy software business and one that looks healthy until you read the bottom of the income statement.

In SaaS, gross margin is revenue minus cost of goods sold, and cost of goods sold is the cost of actually delivering the service, of which cloud infrastructure is typically the dominant component. This matters because gross margin is the number investors and boards use to judge whether a software business is fundamentally efficient, and cloud cost is the part of COGS most within management's control. A SaaS company with strong revenue growth and a quietly compressing gross margin has a cloud cost problem hiding inside an apparently good story, and the only way to see it is to track how infrastructure flows into COGS over time.

This explainer sits under our CFO's guide to cloud cost management, the pillar for this cluster, and connects directly to the Run step of our See, Cut, Lock, Run method, where a falling unit cost protects margin. It pairs with the sibling article cloud cost and the path to profitability, and builds on cloud unit economics, measuring cost per customer.

Cloud cost is the most controllable line in SaaS COGS

You cannot easily reduce support headcount or payment processing fees without affecting the product. Cloud infrastructure, by contrast, is full of waste, oversizing and missed commitments, which makes it the first place to look when gross margin needs defending.

What belongs in SaaS COGS

Cost of goods sold for a SaaS business is the cost of running and delivering the service to paying customers. That generally includes the cloud infrastructure that hosts the production product, the third-party services and data costs embedded in delivery, the customer support and success costs tied to serving customers, and the people who keep the production system running. The classification matters because where you draw the COGS line determines your reported gross margin, and different companies draw it differently. The cloud portion is rarely ambiguous, though: the infrastructure that serves paying customers is COGS, and it is usually the largest single item in it.

How cloud cost compresses gross margin

Gross margin compresses when cost of goods sold grows faster than revenue, and cloud cost is a frequent culprit because it scales with usage in ways that are easy to miss. Three patterns recur. First, infrastructure that grows with customer count but was never optimized, so each new customer carries more cost than it should. Second, a free or trial tier whose cloud cost sits in COGS while generating no revenue, quietly dragging the blended margin down. Third, architectural choices, expensive managed services, generous redundancy, that made sense early and now scale as a margin tax. The remedy in every case is the same: attribute the cloud cost to the product and customers it serves, find the waste, and bring the cost per unit down so margin holds as the business grows.

Cloud cost compressing your gross margin?

Our Managed FinOps service attributes infrastructure to COGS, finds the waste dragging margin down, and keeps the cost per customer falling. Independent and buyer-side, with a no savings, no fee option that puts the risk on us.

Talk to us about Managed FinOps →

Reading the gross margin signal

What you seeLikely causeWhere to look
Margin flat as revenue growsCloud cost scaling with usageCost per customer trend
Margin falling steadilyUnoptimized infrastructureWaste, rightsizing, commitments
Margin lower than peersArchitecture or free-tier dragAllocation by tier and product

Defending and improving the margin

Improving SaaS gross margin through cloud cost is the most repeatable margin lever a software business has, because infrastructure waste is common and reducing it does not touch the product or the customer experience. The work is the See, Cut, Lock, Run cycle applied with the income statement in mind: see the cost attributed to COGS by product and tier, cut the waste through rightsizing, scheduling and clearing idle spend, lock in savings with budgets and well-timed commitments, and run a falling unit cost that holds margin as you scale. A point or two of gross margin recovered this way flows straight to the bottom line and lifts the valuation multiple, which is why it is a CFO-level priority rather than an engineering housekeeping task.

Go deeper · free CFO playbook

The CFO's Cloud Cost Playbook includes the COGS attribution worksheet and the gross-margin bridge we use to show how cloud optimization flows through to reported margin.

Accounting classification of COGS varies by company, standard and jurisdiction as of May 2026 and is not advice on your specific reporting. Confirm your COGS definition and treatment with your auditors and against current accounting standards.

The short version

In SaaS, cloud infrastructure is usually the largest line in cost of goods sold and therefore the biggest controllable lever on gross margin. Margin compresses when cloud cost scales faster than revenue, through usage growth, free-tier drag or expensive architecture. The fix is to attribute infrastructure to COGS, cut the waste, and keep the unit cost falling. That margin work is exactly what our Managed FinOps service delivers, as in our SaaS on AWS case study at a 33 percent reduction.

The Cloud Cost Brief

Cloud pricing moves. We tell you when it matters.

New commitment instruments, FOCUS changes, hyperscaler pricing shifts, and the plays that actually move a bill. No schedule, no filler.

Subscribe · Work email only