Metric

Cost of Goods Sold (COGS)

COGS (Cost of Goods Sold), also called Cost of Revenue, represents the direct costs required to deliver your software product to customers. In SaaS, this doesn't involve physical goods or manufacturing — instead, it captures the infrastructure, support, and service costs that are directly tied to running and maintaining your product for users.

What is COGS in SaaS?

COGS measures the variable and semi-variable costs that scale with your customer base. In SaaSFlow, COGS is tracked as a P&L category and is used to calculate gross profit and gross profit margin:

$$\text{Gross Profit} = \text{Revenue} - \text{COGS}$$

For example, if your monthly revenue is €200,000 and your COGS is €40,000, your gross profit is €160,000, giving you an 80% gross margin. That 80% is what's available to cover all other operating expenses — sales, marketing, R&D, and general administration.

What to include in SaaS COGS

A useful rule of thumb: if removing an expense would make it impossible to deliver the product to customers, it belongs in COGS. Typical SaaS COGS components include:

Infrastructure and hosting

  • Cloud compute and storage (AWS, Azure, GCP)
  • Content delivery networks (CDNs)
  • Database hosting and management
  • Monitoring and observability tools

Customer-facing operations

  • Technical support team salaries and tools
  • Customer success and onboarding personnel
  • Professional services and implementation costs
  • Training and documentation teams

Third-party services

  • APIs and software licenses required for product delivery (e.g., payment processing, email delivery, SMS)
  • Data providers integrated into the product

DevOps and reliability

  • Site reliability engineering costs
  • Deployment and CI/CD infrastructure
  • Security and compliance tools directly tied to production

All costs should be "fully burdened" — including salaries, benefits, taxes, and associated tools for each role.

What NOT to include

These costs fall below the gross profit line and should not be counted as COGS:

  • Sales and marketing: Ad spend, sales team salaries, marketing tools
  • Product development / R&D: Engineering salaries for building new features, product management
  • General and administrative: Finance, legal, HR, office rent
  • Customer acquisition costs: These are tracked separately as CAC

The distinction matters because investors and analysts compare gross margins across companies. Inconsistent COGS classification makes benchmarking unreliable and can raise red flags during due diligence.

Why tracking COGS matters

Accurately tracking COGS is important because it:

  • Determines gross margin: COGS directly drives gross profit margin, which is one of the most scrutinized SaaS metrics. A 10% swing in COGS classification can meaningfully change your margin profile
  • Reveals scaling efficiency: As you grow, COGS should grow slower than revenue. If they grow at the same rate or faster, you have a scaling problem
  • Affects unit economics: COGS flows into gross margin, which is a component of LTV and CAC Payback Period calculations. Understating COGS makes these metrics look artificially healthy
  • Guides optimization efforts: Breaking COGS into subcategories (hosting, support, third-party services) reveals which areas offer the best optimization opportunities

COGS and the path to profitability

For early-stage SaaS companies, COGS is often the most controllable cost category. While sales, marketing, and R&D investments may need to increase as you grow, COGS should benefit from economies of scale:

  • Hosting costs per customer decrease as you optimize infrastructure and negotiate volume discounts
  • Support costs per customer decrease as you build self-service tools, knowledge bases, and automated workflows
  • Third-party costs can often be renegotiated as your volume increases

Tracking COGS over time — both in absolute terms and as a percentage of revenue — is essential for understanding your path to profitability and ensuring your business model scales as expected.