Skip to content
All termsFINANCE & PRICING

COGS

Cost of Goods Sold

Also known as: Cost of Revenue

DEFINITION

The direct costs of delivering your SaaS service to a customer — hosting, third-party APIs, payment fees, customer support.

In depth

COGS in SaaS includes everything that scales with customers: cloud hosting, third-party API costs (Stripe, Twilio, OpenAI), CDN, support salaries, customer success tooling.

It does NOT include engineering salaries (that's R&D), marketing (S&M), or office rent (G&A). Getting this classification wrong inflates gross margin on paper while leaving the business broke in cash.

Formula & example

EXAMPLEA SaaS with $20,000 MRR pays $1,800 for hosting, $2,400 for AI API calls, $600 in payment fees and $1,200 for a part-time support hire. COGS = $6,000, so gross margin = ($20,000 − $6,000) ÷ $20,000 = 70%.

Rules of thumb

  • Include anything that grows with each customer you serve: hosting, APIs, payment fees, support.
  • Keep R&D and sales costs out of COGS; they are operating expenses.
  • Review COGS per customer every quarter as usage grows.
  • AI features belong in COGS because each request has a cost.

Common mistakes

  • Booking all cloud spend as R&D, which makes gross margin look better than it is.
  • Forgetting payment processing fees, usually 2 to 3% of revenue.
  • Not separating free-tier costs, which belong in marketing rather than COGS.

FAQ

Is customer support part of COGS?

Yes, support that keeps paying customers running is a cost of delivering the service. Pre-sales support belongs in sales and marketing.

Are developer salaries part of COGS?

Not usually. Building new features is R&D. Engineers who mainly keep production running for customers can be partly allocated to COGS.

How do I lower COGS without hurting the product?

Cache repeated AI results, right-size infrastructure, move simple tasks to cheaper models and negotiate committed-use discounts once usage is predictable.

Related terms

USE THIS IN A REAL PLAN

Turn concepts into a real SaaS blueprint

PlanMySaaS runs COGS and every other SaaS metric for your idea — part of a full blueprint with architecture, feature specs, 21 docs, and Cursor-ready prompts.

Last reviewed 14 April 2026 by Abhi Verma.