COGS (Cost of Goods Sold) for SaaS is the set of direct costs incurred to deliver your software service to customers. Unlike physical products, there's no per-unit material cost — but COGS still exists and significantly affects gross margin.
Getting COGS right matters because it determines your gross margin, which is how investors, acquirers, and benchmarks evaluate your business model quality.
What to include in SaaS COGS
Cloud infrastructure: AWS, GCP, or Azure compute, storage, and network costs that scale with your customer base or usage. This is the largest COGS item for most SaaS companies.
Third-party APIs: Twilio (SMS, voice), Stripe (payment processing fees that you pay but don't charge back), SendGrid, Cloudflare, and similar per-use costs.
Customer support: fully loaded cost of support engineers and tier-1 support agents. This includes salary, benefits, equipment, and management overhead.
Customer success management: a portion (typically 50–75%) of customer success salaries, depending on whether they're primarily onboarding (COGS) or upselling (sales).
Data and content costs: licensed data, third-party datasets, or content that's integral to your product delivery.
What NOT to include in SaaS COGS
- Engineering / R&D (building new features is R&D, not delivery)
- Sales team salaries (below the gross margin line as sales expense)
- Marketing spend (operating expense)
- G&A / corporate overhead (rent, legal, finance, HR)
- Executive salaries (unless directly allocable to service delivery)
Example: calculating SaaS COGS
Company with $500k MRR, 200 customers:
| Cost item | Monthly amount |
|---|---|
| AWS infrastructure | $35,000 |
| Twilio API costs | $8,000 |
| Support team (3 reps, fully loaded) | $30,000 |
| 50% of CS team cost | $15,000 |
| Total COGS | $88,000 |
Gross profit = $500,000 − $88,000 = $412,000 Gross margin = 82.4%
Use the Gross Margin Calculator to calculate your gross margin once you've categorized your own COGS correctly.