SaaS Cost of Goods Sold: Definition and Formula
SaaS cost of goods sold (COGS) is the total direct cost of hosting, running, and supporting a software product for paying customers in a period. It includes cloud infrastructure, third-party SaaS embedded in the product, and direct support staff. It excludes sales, marketing, and admin overhead, which sit in operating expenses.
- SaaS COGS = hosting and infrastructure + product-embedded third-party SaaS + direct support and customer success costs for a period.
- Gross margin = (revenue − COGS) ÷ revenue. A common rule of thumb is that healthy SaaS gross margins sit around 75–85%, but this varies by model.
- Customer-facing tools belong in COGS; internal tools like payroll or HR software do not. Mixing them distorts gross margin.
- For buyers of SaaS, "COGS" means the embedded-tool cost that must be tracked per product and per customer.
- Average SaaS spend is about $9,300 per employee (Vertice), so embedded-tool costs are easy to undercount.
What counts as SaaS cost of goods sold?
COGS includes every direct cost required to deliver the software to a paying customer. If the cost disappears when a customer cancels, it usually belongs in COGS. If it stays the same regardless of customers, it usually belongs in operating expenses.
The three main buckets are hosting and infrastructure, third-party SaaS services used inside the product, and the direct labor for support and customer onboarding. Things like sales commissions, marketing spend, office rent, and internal admin software stay out of COGS.
What is the SaaS COGS formula?
The formula is the sum of all direct delivery costs over a period. Add hosting, embedded third-party SaaS, and direct support and customer success labor for that period.
SaaS COGS = hosting and infrastructure + embedded third-party SaaS + direct support and customer success costs
Then calculate gross margin to see what share of revenue survives after delivery:
Gross margin = (revenue − COGS) ÷ revenue
Run the numbers with a SaaS spend calculator before you commit to a margin target.
Which costs belong in COGS and which do not?
Only direct delivery costs belong in COGS. Everything that supports the business overall belongs in operating expenses. Getting this split right is the whole point, because it determines your gross margin.
| Cost | In COGS? | Why |
|---|---|---|
| Cloud hosting and storage | Yes | Scales with customers |
| Embedded third-party APIs | Yes | Required for the product to work |
| Direct support and onboarding staff | Yes | Delivered per customer |
| Monitoring and logging tools | Yes | Product reliability costs |
| Payroll and HR software | No | Company overhead, not delivery |
| Internal expense and analytics tools | No | Back-office, not customer-facing |
| Sales and marketing | No | Operating expense |
| General and admin | No | Operating expense |
Label every subscription by bucket before you total anything. A shared tracking sheet or a spend-management layer keeps the split clean.
Worked example: SaaS COGS for a 40-customer product
Take a company with $50,000 in monthly recurring revenue and 40 customers. Total the direct delivery costs for the month, then divide.
- Cloud hosting and storage: $9,000
- Embedded third-party APIs (payments, messaging, auth): $4,500
- Direct support and onboarding labor: $6,500
- Monitoring and logging: $1,000
- Total COGS: $21,000
- Gross margin: ($50,000 − $21,000) ÷ $50,000 = 58%
That 58% signals the embedded SaaS stack is eating margin. Before renegotiating, check how many licenses in that stack go unused.
36% of SaaS licenses go unused on average, and the average company uses 305 apps (Zylo 2026 SaaS Management Index). That pattern is where margin leaks hide.
Recalculate COGS per product line and per customer tier. A blended company number hides which product or tier is dragging gross margin down.
How do price increases at renewal affect COGS?
Renewal increases flow straight into COGS and cut gross margin. 79% of IT leaders faced a price increase at renewal (Zylo 2026 SaaS Management Index). Every embedded tool in the product carries that risk.
Model the impact before the renewal date. Use a price increase impact calculator to see the new COGS line and the margin hit. Then decide: absorb it, renegotiate, or replace the tool.
A one-point margin change compounds across every customer. Treat embedded subscriptions as a managed cost category, not an afterthought.
What are the most common COGS mistakes?
The most common mistake is mixing internal tools into COGS. That inflates COGS and makes gross margin look worse than it is, which distorts pricing and investor reporting.
Other frequent errors:
- Ignoring embedded third-party SaaS. API and platform fees sit inside the product and are easy to miss.
- Burying support labor in operating expenses. Direct support belongs in COGS.
- Using a blended figure only. Per-product and per-tier COGS shows where margin actually leaks.
- Forgetting renewals. Price increases silently raise COGS every year.
- No owner. Without one person tracking embedded tools, the list goes stale.
Audit the list before each board or planning cycle. A spend management workflow keeps embedded costs labeled and current.
How should finance and IT act on SaaS COGS?
Act on COGS by assigning ownership, calculating it per product, and reviewing it every quarter. The goal is a repeatable number, not a one-time estimate.
A practical sequence:
-
List every tool used to deliver the product, including embedded APIs.
-
Label each cost as COGS or operating expense using the table above.
-
Calculate COGS and gross margin per product and per customer tier.
-
Flag unused or duplicate embedded licenses and cancel them.
-
Model renewal increases before each contract date.
-
Review quarterly with finance and IT in the same meeting.
This is the same discipline behind chargeback vs showback: visibility first, then decisions. A license-tracking process keeps the embedded list from decaying between reviews.
Sources
Frequently asked questions
What is included in SaaS cost of goods sold?
COGS includes hosting and infrastructure, third-party SaaS embedded in the product, and direct support and customer success labor. It excludes sales, marketing, and general admin costs, which are operating expenses.
How do you calculate SaaS COGS?
Add hosting, embedded third-party SaaS, and direct support labor for the period. Then divide revenue minus COGS by revenue to get gross margin.
Is SaaS COGS the same as operating expenses?
No. COGS covers direct delivery costs that vary with customers. Operating expenses cover sales, marketing, and admin costs that support the business overall.
Do internal tools like payroll software count as COGS?
No. Payroll, HR, and internal admin software support the company, not the customer, so they belong in operating expenses.
How do renewal price increases affect COGS?
A price increase on an embedded SaaS tool raises COGS and lowers gross margin. Modeling it before the renewal date lets finance renegotiate or replace the tool in time.