Financial health

COGS (Cost of Goods Sold)

Definition

The direct costs of delivering your product to customers. For SaaS, COGS typically includes hosting, third-party software, customer support, and payment processing fees.

In depth
6 sections

What Is COGS in SaaS?

COGS (Cost of Goods Sold) — usually reported as cost of revenue by SaaS companies — represents the direct costs of delivering your software to paying customers. In SaaS, this typically includes hosting and infrastructure (AWS, GCP, Azure), third-party software and API costs embedded in the product, customer support and success team costs, payment processing fees, and DevOps/site reliability costs directly tied to keeping the service running. The test for every line is simple: would this cost exist if you stopped selling to new customers and only served the ones you have? If yes, it is probably COGS.

What to Include in SaaS COGS (and What to Leave Out)

Most classification debates come down to a handful of cost lines. The table below shows where each one usually lands and why. When a cost genuinely serves both delivery and building, split it — do not push the whole line to one side.
Which SaaS costs belong in COGS and which are operating expenses
Cost lineUsually booked asWhy
Production hosting & infrastructureCOGSScales with the customers you serve.
Development, staging & test environmentsOpEx (R&D)Used to build the product, not to deliver it.
Third-party APIs & software inside the productCOGSMessaging, data, maps or AI APIs your customers consume.
Internal tools (CRM, HR, accounting software)OpEx (S&M or G&A)Runs the company, not the service.
Customer support teamCOGSServing existing customers is part of delivery.
Customer successSplit: COGS / S&MOnboarding and retention work is COGS; quota-carrying upsell work is sales.
Implementation & onboarding servicesCOGS (services)Report against services revenue, not subscription.
Payment processing feesUsually COGSA per-transaction cost of collecting revenue.
DevOps / SRE keeping production runningCOGSUptime and incident response for live customers.
Engineers building new featuresOpEx (R&D)Future product, not current delivery.
Sales commissions & marketingOpEx (S&M)Acquisition costs, never COGS.
Amortization of capitalized softwareOften COGSMany companies book it in cost of revenue — disclose it.

How to Calculate SaaS COGS

COGS = Hosting + Embedded Third-Party Software + Support + Payment Processing + DevOps

Worked example: a SaaS company with $2,000,000 in annual subscription revenue spends $180,000 on production hosting, $60,000 on third-party APIs, $150,000 on its support team, $50,000 on payment processing and $60,000 on the share of DevOps time spent on production. COGS is $500,000 — 25% of revenue — which gives a gross margin of 75%.

Exclude sales, marketing, R&D, and general administrative costs — those are operating expenses (OpEx), not COGS. The distinction matters because gross margin (Revenue - COGS) is the first profitability metric investors examine.

Allocating Shared People Costs

In an early-stage company, few people do only one job. An engineer might spend a week a month on-call for production incidents; a support lead might also run sales demos. Allocate their cost by time: if an engineer spends 25% of their time keeping production healthy, 25% of their fully loaded cost goes to COGS and 75% to R&D. Document the allocation method once and apply it every month. Consistency matters more than precision — a margin that jumps five points because someone changed an allocation rule looks like a red flag in diligence.

SaaS COGS Benchmarks

Healthy SaaS companies target COGS at 15-30% of revenue, resulting in 70-85% gross margins. If your COGS exceeds 30%, look for hosting optimization opportunities, renegotiate third-party contracts, or examine whether your support model is efficient. Products with heavy data, payments or AI inference costs often run higher COGS than pure workflow software, so compare against companies with a similar cost structure. Professional services revenue typically has much higher COGS (50-80%) and should be reported separately so it does not drag down your subscription margin.

Why COGS Classification Affects Valuation and Financing

Gross margin is baked into almost every way a SaaS business is priced. Investors apply lower valuation multiples to lower-margin revenue, and lenders offering revenue-based financing look at how much of each revenue dollar is left after delivery to judge repayment capacity. Misclassifying costs cuts both ways: dumping R&D into COGS understates your margin and your borrowing capacity, while hiding support costs in OpEx overstates it — and gets reversed once someone reviews your books line by line. A clean, consistently applied COGS definition is one of the cheapest ways to show up to a financing conversation with credible numbers.
Eligibility

See your terms in
under five minutes.

No pitch deck, no scarcity, no countdowns. Connect your data and we'll show you exactly what you qualify for — every figure disclosed up front.

$500K+Last-year revenue
RecurringSubscription or repeat revenue
HealthyRetention & gross margins
Questions
COGS (Cost of Goods Sold)

In practice, yes. SaaS companies rarely sell physical goods, so most report the line as "cost of revenue" rather than "cost of goods sold," often split into cost of subscription revenue and cost of services revenue. Both terms describe the direct cost of delivering what customers pay for, and both feed the same gross margin calculation.

Yes. Customer support and success costs directly tied to serving existing customers are typically included in COGS. However, support costs associated with onboarding new customers are sometimes classified as sales expenses. Follow GAAP guidelines and be consistent.

Usually. Card and payment processing fees are a per-transaction cost of collecting subscription revenue, so most SaaS companies book them in cost of revenue. Some put them in general and administrative expenses instead — either is defensible if you disclose it and apply it consistently, but moving them between periods will distort your gross margin trend.

No. Only the infrastructure that serves paying customers belongs in COGS. Development, staging and test environments exist to build the product, so they are R&D. If your cloud bill mixes both, tag resources by environment and split the invoice accordingly.

Start with your largest cost categories. Optimize cloud infrastructure (right-size instances, use reserved capacity, implement auto-scaling). Renegotiate third-party API and software contracts as volume grows. Invest in self-serve support (knowledge bases, in-app guidance) to reduce support headcount per customer. Even small COGS reductions have an outsized impact on gross margin.

No. Research and development is an operating expense (OpEx), not COGS. COGS only includes costs directly tied to delivering the product to current customers — hosting, support, payment processing, and third-party service costs. Keeping R&D separate ensures your gross margin accurately reflects delivery economics.

Your metrics are the application. See what they qualify you for.

Check your terms