What is cost of revenue?
The cost of revenue includes all expenses tied to delivering a product or service.
For SaaS companies, this might cover hosting fees, cloud infrastructure, software licenses, website maintenance, and customer support team salaries—essentially, anything required to provide the service to customers.
<<Download the SaaS metrics cheat sheet.>>

What is cost of goods sold?
Cost of goods sold (COGS) refers to the direct costs involved in producing a product or delivering a service. This typically includes direct labor, materials, and overhead tied to the production process.
For SaaS businesses, the principle is the same—but the specific costs look a bit different. You’ll want to include any expenses tied directly to delivering and supporting your product or service. That includes:
- Application hosting (like AWS or similar platforms)
- Customer support, account management, and related personnel costs
- Software fees for tools embedded in the product
- Website development and technical support
- Other indirect costs tied to maintaining and improving the service
Factoring in these indirect costs ensures you’re capturing a complete, fully-burdened view of your cost of revenue. For example, your customer success team plays a key role in retention and expansion, often partnering with sales on upsell and cross-sell opportunities. Time spent by sales updating contracts or coordinating with customer success also contributes to your overall service delivery—and belongs in SaaS COGS.
SaaS cost of revenue vs. cost of goods sold
The cost of revenue includes cost of goods sold (COGS) plus additional costs tied to securing and supporting a sale—like distribution and marketing. Put simply, it covers everything involved in delivering the product or service and making the sale.
For ecommerce or retail businesses, these costs often include raw materials, labor, shipping, and production. Because customer support doesn’t directly impact the delivery of a physical product, it’s usually categorized as an operating expense.
In contrast, for SaaS companies, customer support plays an essential role in delivering and maintaining the product experience. That’s why it’s typically included in the cost of revenue. Whether it’s helping users navigate the platform or assisting with technical issues, customer support is directly tied to the service—and crucial for long-term success and retention.
Get the 10 SaaS metrics you didn’t know you needed
How to calculate SaaS COGS
While COGS and cost of revenue may be slightly interchangeable, the formulas are not. The below formula offers how most product-based companies calculate their COGS:

To calculate COGS, add the cost of the inventory you start with and the direct expenses you incur during a given period. Then, subtract the inventory you’re left with at the end of the reporting period.
Since SaaS companies offer software as a service, the formula isn’t applicable. Instead, they sum up all the direct costs of offering their service.
For example, here’s what Slack included in its cost of revenue or SaaS COGS calculation while preparing its income statement for the first quarter of 2022.
In other words, there’s no single formula you can use to calculate SaaS COGS. It’s simply a sum of direct costs — which may differ among SaaS companies.
Key takeaways
- The cost of revenue encompasses all direct expenses related to producing and delivering a product or service, such as hosting fees, software licenses, and customer support salaries
- Cost of goods sold (COGS) focuses specifically on the direct costs of producing a product or delivering a service, including direct labor and material costs
- In SaaS, cost of revenue includes COGS plus marketing and distribution expenses, reflecting all costs associated with obtaining sales
- Understanding these financial metrics allows SaaS businesses to assess profitability and financial health accurately
Why cost of revenue is important for SaaS businesses
Cost of revenue offers valuable insight into a company’s financial health. It’s essential for calculating gross profit and gross margin—key metrics for evaluating profitability, especially using benchmarks like the Rule of 40.
In SaaS, cost structures can vary widely compared to other industries. These costs can shift significantly over time, directly impacting your margins.
Looking at real-world examples, financial statements from companies like Slack highlight how fluctuating costs affect gross margin. While public filings don’t always provide a full breakdown, they often reveal key drivers behind cost increases. For Slack, this included higher third-party hosting fees, personnel-related expenses, and payment processing costs—all of which contributed to a rise in its overall cost of revenue.

The increase in Slack’s cost of revenue can be directly traced back to its growth. But if the cost of revenue increases without significant returns in terms of growth, you need to break down these costs and find out what’s affecting your margins or financial efficiency.
Understanding these trends helps finance teams better forecast, manage profitability, and make strategic decisions.
Cost of revenue FAQs
What is COGS in SaaS?
For SaaS companies, cost of goods sold (COGS) includes all direct costs related to delivering the product or service. This can include hosting and cloud infrastructure, software license fees, website maintenance, and salaries for customer support teams.
What is the cost of revenue formula?
A general formula is:
- Cost of revenue = COGS + costs of delivering the product (like marketing)
In SaaS, the lines between COGS and cost of revenue often blur. What you include may vary based on your business model—think cloud storage, personnel costs, and customer support.
Is cost of revenue an expense?
Yes, cost of revenue is categorized as an expense. It’s written off as an expense in the company’s income statement.
Recommended For Further Reading
Can COGS be used for services?
Yes, though it’s often called “cost of revenue” or “cost of sales.” Service businesses use these terms to reflect the direct costs of delivering their services.
Is cost of revenue the same as cost of goods sold?
Not exactly. COGS is a subset of cost of revenue. The latter includes additional costs like distribution or marketing—especially relevant in SaaS, where physical goods aren’t part of the product.