COGS is the number that sits between your revenue line and your gross profit. It represents the direct costs of producing or acquiring the goods you sell. Get COGS wrong and every profitability metric downstream is wrong too: gross margin, contribution margin, break-even, and ultimately your ability to evaluate whether marketing spend is generating profitable growth.

I've seen marketers treat COGS as an accounting problem that's not their concern. That's a mistake. COGS determines your pricing floor, your margin for marketing investment, and your competitive position on price.

The Definition

COGS includes all direct costs attributable to the production or acquisition of goods sold during a period:

For manufacturers: Direct materials + Direct labor + Manufacturing overhead

For retailers: Purchase price of inventory + Freight-in costs + Import duties

For SaaS companies: Cloud hosting + Payment processing + Customer support + Third-party software licenses

The formula:

COGS = Beginning Inventory + Purchases During Period - Ending Inventory

Or for service/SaaS businesses:

COGS = Sum of all direct costs of delivering the service

What's In and What's Out

Included in COGS NOT Included in COGS
Raw materials Marketing and advertising
Direct labor (production workers) Sales team salaries
Manufacturing overhead Office rent (non-production)
Packaging materials R&D expenses
Freight-in (inbound shipping) General and administrative
Factory utilities Depreciation on office equipment
Quality control Executive compensation

The distinction matters because COGS is subtracted from revenue to calculate gross profit, while operating expenses (the "NOT included" column) come out below the gross profit line. This is why two companies with identical revenue can have very different gross margins.

Inventory Valuation Methods

How you value inventory directly affects COGS and therefore reported profitability:

FIFO (First In, First Out): Oldest inventory costs are expensed first. In inflationary environments, FIFO produces lower COGS and higher gross profit because older, cheaper inventory hits the P&L first. Most consumer goods companies use FIFO.

LIFO (Last In, First Out): Newest inventory costs are expensed first. In inflation, LIFO produces higher COGS and lower gross profit but lower tax liability. Only allowed under U.S. GAAP (not IFRS). Companies like ExxonMobil use LIFO for tax advantages.

Weighted Average Cost: Averages all inventory costs together. Smooths out price fluctuations. Common in industries where individual units are indistinguishable (chemicals, commodities, grain).

Method In Inflation: COGS In Inflation: Gross Profit In Inflation: Tax Bill
FIFO Lower Higher Higher
LIFO Higher Lower Lower
Weighted Average Middle Middle Middle