What is COGS for SaaS?
Cost of goods sold (COGS) for SaaS is the total direct cost you incur to deliver your software to customers. It measures what it takes to run, support, and maintain your product so users actually get the service they paid for.
In a traditional business, COGS tracks materials and labor. In SaaS, you don’t ship physical goods, so your COGS reflects the infrastructure and people required to keep your software running reliably at scale.
You use COGS to understand product gross margin and profitability, price with confidence, and manage your margins as you grow. It tells you what it really costs to earn each dollar of subscription or usage revenue, which is why investors and operators track it so closely.
Synonyms
- SaaS COGS
- Cost of Revenue
- Cost of goods sold for SaaS
Why COGS is Unique for SaaS
COGS looks different in SaaS because you deliver value through an ongoing service, not a one-time product. You aren’t manufacturing anything, nor do you have physical inventory, so the standard “cost of goods sold” formula is irrelevant.
Instead, you’re running a live, always-on platform that needs infrastructure, support, and engineering attention every single day. Your biggest cost drivers come from cloud hosting, third-party APIs, customer support, and the technical operations needed to maintain and improve your product.
COGS is also unique because it blurs the line between “product investment” and “service delivery.” You have to decide which engineering roles, tools, and systems directly support the live product versus which ones belong in R&D or operating expenses.
Components of SaaS COGS
As we’ve already touched on, the cost structure in SaaS is a lot different than in other kinds of business models. COGS drivers for SaaS products primarily fall into one of two buckets: infrastructure and platform costs and direct labor costs. There are also others, which we’ll touch on below.
Infrastructure and platform costs
Infrastructure and platform costs include everything you pay to actually deliver your product to users. These are the technical systems and third-party components your software relies on to function the moment someone logs in, runs an API call, or triggers an automated workflow.
This bucket covers:
- Cloud hosting, storage, databases, compute resources, security layers, and monitoring tools
- Third-party software, data, and APIs you embed directly into the user experience
If your product depends on an external search engine, messaging service, AI model, or data feed to deliver core functionality, that spend belongs in COGS too.
These costs scale with usage. More users, more data, and more real-time activity drive higher spend on servers, monitoring tools, and essential platform services. That’s why infra sits at the top of every SaaS COGS model. It is the baseline cost of delivering your product every day.
Direct labor and personnel costs
Direct labor costs cover the employees who keep your production environment healthy and your service running smoothly. You’re accounting for the teams responsible for:
- Infrastructure
- DevOps
- Site reliability
- Internal engineering work tied to operating the live product
This also includes professional services roles that deliver onboarding, implementation, and configuration work for customers. If these hands-on activities are required to get a customer live and using the product, then they qualify as part of “delivering the service.”
Customer support and technical support belong here too, but only when they handle true product functionality and technical issue resolution. If the work directly supports the stability, performance, or usability of the service, it sits inside COGS.
Other direct costs
Other direct costs capture the expenses tied to delivering your service that don’t fall under infrastructure or labor.
The biggest one is payment processing. Every subscription or usage charge runs through a processor that takes a fee, and those fees scale with revenue, so they belong in COGS.
You also include the amortization of capitalized software development costs when that work directly relates to the product you deliver today. This spreads the cost of past development across the periods where customers actually benefit from it.
Infrastructure and platform costs
- Cloud hosting and compute
- Databases and storage
- Embedded third-party software
- External data and API fees
- Security and monitoring tools
Direct labor and personnel costs
- DevOps and infrastructure teams
- Site reliability engineering
- Technical support staff
- Implementation and onboarding roles
- Bug fixes and performance improvements
Other costs
- Payment processing fees
- Capitalized dev amortization
- Data transfer fees
- Email and messaging services
- Compliance and audit tooling
Challenges in Calculating SaaS COGS
It’s a lot harder to calculate COGS and account for it on your financial statements as a SaaS company because (a) you deliver an always-on service, (b) your costs blend across teams and systems, and (c) you have separate what supports the live product from what belongs in R&D or an operational expense category like Sales and Marketing.
Allocation complexity
Let’s start with the hardest part: figuring out how to split shared resources between COGS and operating expenses (OpEx). This is where most SaaS teams get tripped up because the same people, tools, and environments might support both product delivery and product development.
You deal with three core challenges here:
- Shared personnel: You need to decide how you’ll allocate the salary of engineers who split their time between maintenance and building new features. Only the portion tied to things like fixing production bugs, maintaining uptime, improving performance, handling incidents, and supporting the infrastructure that powers the service belong in COGS.
- Shared infrastructure: Cloud hosting powers multiple environments. So you have to separate spend for development and staging from your production environment. Only hosting expenses for production count toward COGS.
- Support staff: Support roles are heavily debated. When a team handles technical issue resolution, that work belongs in COGS. If they spend time on upsells, retention calls, or anything tied to revenue growth, that portion shifts to Sales and Marketing OpEx.
Accounting and reporting standards
You also face accounting rules that force you to draw clear lines between what you capitalize, what you expense, and what you classify as COGS. GAAP has specific guidance for software development costs under ASC 985-20 and ASC 350-40, so you need to know which work qualifies for capitalization and which goes straight to OpEx.
You also need a consistent, defensible allocation methodology. Investors and auditors expect you to classify costs the same way every period. If you shift expenses between COGS, R&D, and OpEx without a clear rationale, you’ll end up misstating margins and undermining the accuracy of your financial reporting.
SaaS COGS vs. Operating Expenses (OpEx) Examples
COGS and operating expenses are two different things. COGS covers the direct costs of delivering your SaaS product. OpEx covers the indirect costs required for day-to-day business operations.
The critical distinction: direct vs. indirect
Here it is:
- Direct costs tie to the live service. They rise as usage or customer volume increases.
- Indirect costs keep your business running but don’t directly deliver the product. Rather, they support sales, marketing, admin, and long-term product development.
Once you separate direct delivery from indirect operations, you get a clear picture of product margins and a cleaner financial model because you’re finally measuring the true cost of delivering your product versus the cost of running the rest of your business.
When you classify direct costs correctly, you see how much it actually takes to serve a customer and how much profit you keep from each dollar of revenue. That gives you accurate gross margins, which drive your pricing strategy, scalability plans, and how investors judge your financial health.
When you classify indirect costs correctly, you avoid inflating COGS with expenses that don’t belong there. That way, you don’t distort your margins and your financial statements are clean, comparable, and useful for high-level decision-making.
OpEx categories and examples
Once you draw the line between direct delivery and indirect operations, you can group the remaining costs into OpEx.
Here are the main categories you track:
Research and development (R&D)
Engineers, product managers, designers, and tools focused on building new features, improving the roadmap, or experimenting with future capabilities. This work doesn’t support the current production environment, so it falls outside COGS.
Sales and marketing
Everything tied to acquiring and retaining customers. This includes sales reps, commissions, advertising spend, demand gen tools, content creation, events, and revenue operations. If your customer success and account management teams have quotas or targets for adoption, retention, upsells, and renewals, they’re in this category as well.
General and administrative (G&A)
General and administrative expenses are the core functions that keep your company running but don’t tough the product: finance, HR, legal, IT, compliance, and executive leadership. You’ll include facilities and overhead expenses like office rent, equipment, software licenses, and other tools used for internal operations here as well.
Tools and Solutions for Accurate COGS Calculation
At scale, it’s impossible to manage any accounting operation, let alone one this nuanced, without software. You’ll need specific tools for financial management and cloud cost management.
Financial management systems
Your two core tools for SaaS finance are ERP/accounting software and an FP&A platform.
ERP and accounting systems handle your chart of accounts, general ledger, cost allocation rules, capitalization of software development, and the month-end close. They make sure every dollar lands in the right place and your financial statements follow GAAP.
FP&A platforms help software companies model scenarios, forecast margins, and monitor how COGS behaves as usage and customer volume change. You use them to budget, analyze trends, and see how changes in infrastructure, headcount, or pricing affect your profitability.
Cloud cost management (FinOps) platforms
FinOps software like CloudZero and Harness give you granular visibility into your cloud costs. You can break spend down by environment, service, product feature, and even user. This level of detail lets you separate production spend from development spend, attribute costs to specific teams or workloads, and spot waste you’d never find manually.
Strategies to Reduce COGS for a SaaS Startup
Generally speaking, as a SaaS company, you can reduce your cost of goods sold in one of three ways: optimizing your cloud infrastructure, tightening how you deliver labor and services, and getting smarter about vendor and licensing management.
The reason is that of these areas gives you direct control over the costs that scale with your product, so improvements here have an immediate impact on your gross margins.
Cloud infrastructure optimization
Start by tightening how you use cloud resources. Most early-stage teams overpay because they run oversized instances, keep unused environments alive, or don’t monitor consumption closely. You fix this by implementing right-sizing, shutting down idle resources, and using autoscaling so you only pay for what you actually need.
Then review your storage, data transfer, and compute patterns. Moving from on-demand pricing to reserved instances or savings plans drives meaningful reductions once you have predictable workloads. You can also consolidate services, optimize queries, and switch to managed offerings that reduce your overhead.
It’s a good idea to track your spend at the feature, environment, and customer level. When you know which parts of your product drive the most cost, you’re able to make smart trade-offs and become more efficient.
Labor and service delivery efficiency
Your next lever is making your people more effective. Direct labor is a major COGS driver, so you reduce costs by improving how teams deliver support, onboarding, and technical operations.
Start with automated support. Use self-service help centers, in-product guidance, and AI chat to resolve simple issues so you’re not pulling engineers and support reps into every ticket.
Then improve how you deliver customer onboarding and professional services. Standardize your implementation playbooks and templatize configurations to eliminate repetitive manual work. The smoother your delivery motion, the less time you spend per customer.
Once that’s sorted, streamline your DevOps and SRE processes. Automate deployments, improve monitoring, and reduce firefighting by investing in reliability upfront. When your systems require fewer hands-on interventions, your labor costs drop and your margins rise.
Vendor and licensing management
One of the quickest ways to improve your financial metrics is to simply negotiate better deals with your vendors. Start with your highest-cost tools, especially the third-party software and data sources embedded in your product.
Go through your licenses and entitlements. You’d be surprised how many startups overpay for seats they don’t use, features they don’t need, or plans that don’t match their actual consumption patterns. Consolidate vendors where you can, downgrade inflated plans, and push for multi-year discounts once you have predictable needs and a long-standing relatinoship with your main vendors.
People Also Ask
Are customer support salaries considered SaaS COGS?
Generally, yes. Customer and technical support count as COGS because they help you deliver a usable, functioning service. If a support or success rep spends time on upsells or renewals, though, you’ll allocate that portion of their salary to Sales and Marketing OpEx. The portion tied to technical troubleshooting, onboarding, or reducing churn belongs in COGS.
What is the difference between cost of revenue and COGS for SaaS?
In SaaS, “cost of revenue” and cost of goods sold” usually refer to the same set of direct delivery costs. Some companies prefer to use cost of revenue in a broader sense to capture small distribution and revenue-tied costs that don’t fit cleanly into traditional COGS. But for financial reporting, both terms represent the direct cost of delivering your service.
What expenses should be excluded from COGS for a SaaS company?
You should exclude anything that doesn’t directly deliver the live product. That includes R&D for future features, sales and marketing activities, executive and administrative salaries, customer success roles focused on expansion, and internal tools unrelated to running the production environment. These expenses belong in OpEx, not COGS.