Cost of goods sold (COGS) is the direct cost a company incurs to deliver its product or service to customers. In SaaS, COGS often includes cloud hosting, infrastructure, service delivery tools, and the portion of support or operations costs directly associated with providing the service. The exact classification depends on the company’s accounting policy and business model.
COGS matters because it helps a SaaS business understand the cost of serving customers and calculate gross profit and gross margin. Although software can be replicated at low marginal cost, operating a reliable service still requires infrastructure, people, and third-party services.
What Is Included in SaaS COGS?
Common costs that may be included, depending on the company’s policies, include:
- Cloud infrastructure and hosting: Compute, storage, networking, databases, and other resources required to run the product.
- Service delivery software: Third-party services essential to delivering the product, such as certain messaging, monitoring, or processing services.
- Customer support and operations: The portion of support or service operations directly tied to delivering the contracted service, where the accounting policy classifies it as a direct cost.
- Payment and transaction costs: Processing or usage fees directly associated with customer transactions or product delivery, where appropriate.
- Reliability and security operations: Some costs for monitoring, incident response, or service operations may be treated as direct delivery costs depending on how the business defines and reports COGS.
These are examples, not universal rules. Salaries, support teams, software development, customer success, and implementation costs can be classified differently across companies and accounting frameworks. A consistent documented policy is more important than copying another company’s cost categories without checking whether they fit.
How Is COGS Calculated?
A basic calculation is:
Gross profit is then calculated as:
And gross margin is:
Example: If a SaaS company reports $500,000 in revenue during a quarter and $100,000 in COGS under its stated policy, gross profit is $400,000 and gross margin is 80%. This example is illustrative. The result depends on which costs the company consistently includes in COGS.
Why Is COGS Important for SaaS Businesses?
1. It shows the cost of serving customers
COGS helps leaders understand how much it costs to provide the service at the current scale. Rising infrastructure or service delivery costs can reduce gross margin even when revenue is growing.
2. It helps measure gross margin
Gross margin indicates the share of revenue remaining after direct delivery costs. It helps the business assess how much contribution is available to cover operating expenses such as sales, marketing, research, and administration, depending on the reporting structure.
3. It informs pricing decisions
Understanding delivery costs helps teams evaluate whether pricing and packaging support the economics of the service. A plan with heavy usage or support needs may require different limits, pricing, or product design than a low-cost plan.
4. It supports infrastructure planning
Cloud and third-party service costs can grow as usage increases. Tracking COGS by customer, plan, workload, or feature can reveal opportunities to improve efficiency without reducing reliability or customer outcomes.
5. It improves financial comparisons
Consistent COGS definitions help teams compare gross margin over time and explain changes to leadership or investors. If cost classification changes, document it so readers can distinguish operational changes from accounting presentation changes.
COGS vs. Operating Expenses
| Category | Main purpose | Possible SaaS examples |
|---|---|---|
| COGS | Direct costs associated with delivering the service | Hosting, infrastructure, selected service-delivery tools |
| Sales and marketing | Acquiring customers and generating demand | Advertising, sales compensation, campaigns |
| Research and development | Building and improving the product | Product engineering, design, research |
| General and administrative | Running the overall business | Finance, legal, general administration |
Actual classification varies. For example, a company may classify some support labor as COGS and other customer-facing roles as operating expenses. Use the company’s policy and applicable accounting guidance rather than assuming every cost with a technical label belongs in COGS.
How to Manage SaaS COGS
Track major cost drivers and compare them with usage, customer count, revenue, and service quality. Infrastructure cost per active account or per workload can help identify unusual increases, but the metric should be interpreted alongside customer mix and usage intensity.
Review cloud utilization, storage retention, data transfer, third-party pricing, and workloads that run unnecessarily. Rightsizing resources, improving caching, reducing redundant processing, and setting cost alerts may help. Changes should be tested against reliability, performance, security, and customer experience requirements.
Connect cost reviews with product and pricing decisions. If a small number of customers create unusually high service costs, investigate whether their use case is supported by the current plan and whether technical or commercial changes are appropriate. Avoid making a decision based only on average cost when usage varies widely across accounts.
Common COGS Mistakes
- Changing classification without explanation: Shifting costs between COGS and operating expenses can distort gross margin trends.
- Ignoring variable usage: Infrastructure costs may grow faster than customer count when workloads are intensive.
- Cutting delivery costs blindly: Reductions that harm uptime, support, or security can damage retention.
- Comparing companies without context: Different accounting policies and product architectures affect reported gross margin.
- Using revenue alone to judge efficiency: Cost per customer, workload, or feature may expose issues hidden by total revenue growth.
- Failing to document assumptions: Finance and engineering teams need shared definitions to explain cost movements.
Frequently Asked Questions
Is cloud hosting always COGS?
Cloud hosting is commonly treated as a direct service delivery cost in SaaS, but classification should follow the company’s accounting policy and applicable rules. Some technology costs may support broader operations rather than direct delivery.
Is customer support part of COGS?
It can be, especially when support is directly tied to delivering the service, but companies classify support costs differently. Define the policy and apply it consistently.
What is the difference between COGS and gross margin?
COGS is the direct cost amount. Gross margin is the percentage of revenue remaining after subtracting COGS from revenue and dividing gross profit by revenue.
Should SaaS COGS decrease as the company grows?
Not necessarily. Scale can improve efficiency, but usage, product complexity, support needs, and infrastructure design also affect costs. Monitor cost trends alongside service quality and customer outcomes.