KPI Tree

Metric Definition

COGS

COGS = Beginning Inventory + Purchases During Period - Ending Inventory
COGSCost of Goods Sold
Metric GlossaryFinancial Metrics

Cost of goods sold

Cost of goods sold (COGS) represents the direct costs attributable to producing the goods or delivering the services that a company sells. It is the single largest determinant of gross margin and a critical input to pricing and profitability analysis.

7 min read

Generate AI summary

What is COGS?

Cost of goods sold is the total direct cost of producing or delivering the products and services a company sells. For a manufacturer, COGS includes raw materials, direct labour, and factory overhead. For a retailer, it includes the purchase price of inventory. For a SaaS company, it includes hosting costs, third-party service fees, and the cost of customer support.

COGS is deducted from revenue to calculate gross profit. This makes it the first and most important cost layer in the income statement. A company that cannot manage its COGS effectively will have thin gross margins that limit its ability to invest in growth, regardless of how efficiently it manages operating expenses.

The distinction between COGS and operating expenses matters for analysis. COGS should include only the costs that scale directly with revenue or are directly required to deliver the product. Sales salaries, marketing spend, and R&D are operating expenses, not COGS, even though they are essential to the business. Misclassifying costs between COGS and operating expenses distorts both gross margin and operating margin, making it harder to diagnose performance issues.

How to calculate COGS

For product businesses:

COGS = Beginning Inventory + Purchases - Ending Inventory

For SaaS and service businesses, COGS is typically calculated differently because there is no physical inventory:

COGS = Hosting and Infrastructure + Customer Support Labour + Third-party API Costs + Payment Processing Fees

Gross margin then follows:

Gross Margin = (Revenue - COGS) / Revenue x 100

Business typeCOGS typically includesCOGS typically excludes
SaaSHosting, support staff, third-party APIs, payment processingSales, marketing, R&D, G&A
E-commerceProduct cost, shipping, packaging, warehouse labourMarketing, technology, corporate overhead
ManufacturingRaw materials, direct labour, factory overheadSales, marketing, R&D, administrative
Professional servicesBillable staff costs, project materials, subcontractorsBusiness development, unbillable time, overhead

COGS in a metric tree

The tree reveals the cost structure behind gross margin. For SaaS companies, infrastructure costs are often the most scalable (they can grow sub-linearly with revenue through better architecture and vendor negotiation), while service delivery costs are the most challenging to scale because they require human labour. Companies that automate support and reduce the need for hands-on customer success can improve gross margins significantly as they scale.

COGS and gross margin benchmarks

Business typeTypical COGS as % of revenueTarget gross margin
SaaS15-30%70-85%
E-commerce40-70%30-60%
Manufacturing50-70%30-50%
Professional services40-60%40-60%
Marketplace10-20%80-90% (on take rate)

For SaaS companies, a gross margin below 70% is a red flag that suggests either heavy infrastructure costs, excessive support burden, or misclassified operating expenses. Best-in-class SaaS companies achieve 80-85% gross margin through efficient infrastructure, self-serve support, and automation of delivery processes. This is a key input to the Rule of 40 calculation.

How to reduce COGS

  1. 1

    Optimise infrastructure spend

    Implement reserved instances, auto-scaling, and architecture optimisations. Renegotiate cloud contracts as you scale. Infrastructure costs should grow sub-linearly with revenue.

  2. 2

    Automate customer support

    Self-serve knowledge bases, chatbots, and in-app help reduce the need for human support agents. Each support ticket avoided is a direct COGS reduction.

  3. 3

    Renegotiate third-party contracts

    As your volume grows, you gain leverage with API providers, payment processors, and data vendors. Renegotiate annually based on volume commitments.

  4. 4

    Shift from professional services to product

    If customers require significant implementation or customisation, build these capabilities into the product. This shifts costs from high-COGS services to low-COGS software.

Common mistakes

  1. 1

    Including R&D in COGS

    R&D costs are operating expenses, not COGS. Including them in COGS artificially deflates gross margin and inflates operating margin, making comparisons misleading.

  2. 2

    Excluding support costs from COGS

    Customer support that is required to deliver the service should be in COGS. Excluding it inflates gross margin and understates the true cost of serving customers.

  3. 3

    Not tracking COGS per customer

    Knowing total COGS is useful, but understanding COGS per customer reveals which customer segments are expensive to serve and which generate the highest gross margins.

Decompose COGS and improve gross margin

Build a metric tree that breaks down cost of goods sold into infrastructure, service delivery, and third-party components to identify the highest-impact margin improvement opportunities.

Experience That Matters

Built by a team that's been in your shoes

Our team brings deep experience from leading Data, Growth and People teams at some of the fastest growing scaleups in Europe through to IPO and beyond. We've faced the same challenges you're facing now.

Checkout.com
Planet
UK Government
Travelex
BT
Sainsbury's
Goldman Sachs
Dojo
Redpin
Farfetch
Just Eat for Business