Skip to main content

Cost of goods sold (COGS) explained simply

Cost of goods sold (COGS) is the direct cost to produce or deliver what the company sells. It is the first expense subtracted from revenue on the income statement. COGS is crucial because it determines gross profit, which determines gross margin—the first layer of profitability visible to investors.

Understanding COGS is essential because it reveals the inherent profitability of the business itself, separate from how much the company spends on running operations. A company with 80% gross margins sells products that are inherently profitable. A company with 20% gross margins has thinner economics and must operate very efficiently to make a profit.

COGS is also where operational efficiencies show up first. A company that improves manufacturing processes, negotiates better supplier contracts, or shifts to cheaper raw materials will first show improvement through declining COGS and rising gross margins.

Quick definition: Cost of goods sold (COGS) is the direct cost of producing or delivering the products or services a company sells, including materials, direct labor, and manufacturing overhead directly tied to production. It excludes operating expenses like marketing, research, and administration.

Key takeaways

  • COGS is subtracted from revenue to calculate gross profit, the first profit layer
  • COGS includes only direct, variable costs tied to production; it excludes operating expenses
  • Gross margin (gross profit / revenue) reveals the inherent profitability of the business
  • Rising COGS relative to revenue signals operational problems or pricing pressure
  • Comparing COGS across years and competitors reveals cost management and pricing power
  • COGS is tracked using inventory methods (FIFO, LIFO, weighted average) that affect reported earnings

What's included in COGS

COGS varies by business model:

Manufacturing companies:

  • Raw materials (steel, plastics, components)
  • Direct labor (assembly line wages, not supervisors)
  • Manufacturing overhead directly tied to production (factory utilities, equipment maintenance)
  • Freight to customers

Retailers:

  • Cost of inventory purchased for resale
  • Freight/inbound shipping from suppliers
  • Store-level labor (cashiers, stockers—not managers, not corporate)

SaaS/Software:

  • Server and hosting costs
  • Customer support staff wages
  • Payment processing fees
  • Cloud computing resources used to deliver the service

Professional services:

  • Direct consultant time billed to clients
  • Subcontractor fees
  • Client-specific materials or travel

Restaurants:

  • Food costs (ingredients)
  • Direct labor (line cooks, dishwashers—not managers)
  • Supplies (napkins, cups, condiments)

What's excluded from COGS (covered later in Operating Expenses):

  • Marketing and advertising
  • Research and development
  • General and administrative salaries (CFO, HR, legal)
  • Rent on corporate headquarters
  • Executive salaries
  • Sales commissions (sometimes included in COGS, sometimes in OpEx—varies by company)

The distinction is essential: COGS varies with production volume. If a company produces 10% more units, COGS rises approximately 10% (assuming constant efficiency). Operating expenses don't vary proportionally.

COGS examples across industries

Apple (FY2023):

  • Revenue: $383.3B
  • COGS: $223.6B
  • Gross Profit: $159.7B
  • Gross Margin: 41.6%

Apple's COGS includes hardware manufacturing costs (materials, assembly labor, shipping), but not R&D (separate line), not marketing (separate line), and not corporate overhead (separate line). For every $100 in revenue, Apple spends $41.60 directly to make products and $58.40 on everything else (R&D, marketing, operations, taxes, interest).

Costco (FY2023):

  • Revenue: $243.5B
  • COGS: $215.3B
  • Gross Profit: $28.2B
  • Gross Margin: 11.6%

Costco's low gross margin is typical for retailers buying goods for resale. For every $100 in revenue, Costco spends $88.40 directly to buy inventory and ship it to warehouses. The remaining $11.60 must cover labor, rent, utilities, management—an incredibly tight margin that only works because of Costco's operational efficiency.

Microsoft (FY2023):

  • Revenue: $211.9B
  • COGS: $60.7B
  • Gross Profit: $151.2B
  • Gross Margin: 71.4%

Microsoft's high gross margin reflects software's inherent economics. Once the software is built, manufacturing an additional copy costs nearly zero. Most of the $60.7B COGS is hosting costs for Azure, customer support, and payment processing—but not the development cost of the software itself (that's R&D, a separate line).

Starbucks (FY2023):

  • Revenue: $36.2B
  • COGS: $13.6B
  • Gross Profit: $22.6B
  • Gross Margin: 62.4%

Starbucks' gross margin is high for food and beverage because of pricing power and premium positioning. The $13.6B COGS is mostly coffee, milk, cups, and store-level labor. For every $100 in revenue, Starbucks spends $37.60 directly on product and labor, leaving $62.40 for overhead, marketing, and profit.

Gross profit and gross margin

Gross profit is revenue minus COGS:

Gross Profit = Revenue - COGS
Gross Margin = Gross Profit / Revenue

Gross margin as a percentage is more useful than absolute gross profit because it normalizes across company size.

If Company A has $100M revenue and $20M COGS (80% margin) and Company B has $50M revenue and $10M COGS (80% margin), they have identical gross margins despite different sizes. This makes comparison meaningful.

Why gross margin matters:

  • It shows the inherent profitability of the product or service
  • It reveals pricing power (high margins mean customers value the product highly)
  • It shows operational efficiency (improving margins mean better cost control)
  • It's the first profit layer; if gross margins are poor, the company can't be profitable overall

A company with 15% gross margin (like grocery stores) must operate very efficiently and scale massively to be profitable. A company with 80% gross margin (like software) can afford a larger expense base and still be profitable.

Gross margin is a key metric analysts and investors track. Deteriorating gross margins signal trouble.

How COGS is calculated: inventory methods

For companies with inventory, how they value that inventory affects COGS and reported earnings. This is where accounting methods matter.

FIFO (First-In, First-Out): The oldest inventory is assumed to be sold first. In inflationary periods, FIFO results in lower COGS (older, cheaper inventory is sold first) and higher reported earnings and higher ending inventory values.

LIFO (Last-In, First-Out): The newest inventory is assumed to be sold first. In inflationary periods, LIFO results in higher COGS (new, expensive inventory is sold first) and lower reported earnings but lower taxes (because earnings are lower). LIFO is allowed under U.S. GAAP but not IFRS.

Weighted Average: The average cost of all inventory available is used. This is between FIFO and LIFO in effect.

Example: Inflationary period

A company buys inventory in layers:

  • January: 100 units at $10 = $1,000
  • June: 100 units at $15 = $1,500
  • October: 100 units at $20 = $2,000
  • Sells 100 units in November

FIFO: Cost = $10 (oldest batch). COGS = $1,000. Profit = Revenue - $1,000. LIFO: Cost = $20 (newest batch). COGS = $2,000. Profit = Revenue - $2,000. Weighted Average: Cost = $15 (average of all). COGS = $1,500. Profit = Revenue - $1,500.

In inflation, LIFO produces lower earnings but lower taxes. Companies often use LIFO during inflationary periods to reduce taxable income.

The choice of inventory method can materially affect reported earnings, which is why investors must check the footnotes.

COGS as a percentage of revenue

Sophisticated investors track COGS as a percentage of revenue (the inverse of gross margin) and watch for trends:

Improving (declining COGS %): The company is improving efficiency, raising prices, or shifting to higher-margin products. This is positive.

Deteriorating (rising COGS %): The company is facing input cost inflation, pricing pressure, or operational problems. This is negative and often precedes profit warnings.

Year 1: Revenue $100M, COGS $70M, COGS % = 70%
Year 2: Revenue $110M, COGS $72M, COGS % = 65%
Year 3: Revenue $115M, COGS $80M, COGS % = 70%

Year 2 shows operational leverage (COGS % declined). Year 3 shows deteriorating efficiency or pricing pressure (COGS % increased despite revenue growth). Investors would investigate Year 3: what caused the COGS increase?

COGS red flags

Rising COGS without rising revenue: The company is losing pricing power or facing input cost inflation. Gross margins are compressing.

COGS rising faster than revenue: Same problem. The company is less profitable on each additional unit sold.

Sudden COGS changes: A significant jump or drop in COGS percentage (not explained by obvious items like inventory writedowns or a major acquisition) is worth investigating. It could signal hidden problems or one-time items.

COGS methods changing: If a company switches from FIFO to LIFO or LIFO to FIFO, the impact on earnings should be disclosed. A switch to LIFO during inflationary times is tax-motivated and depresses reported earnings.

Unusual inventory: If a retailer has excess inventory that's not selling, management might write it down (a charge to COGS) or might understate the reserve and overstate COGS margins. This is a forensic red flag.

COGS vs Operating Expenses

A critical distinction that confuses many investors: COGS is not the same as Operating Expenses.

Revenue
- COGS (direct product/service cost)
= Gross Profit
- Operating Expenses (R&D, SG&A)
= Operating Income

COGS varies with production. Operating Expenses are more fixed (an executive's salary is the same whether the company sells 1M units or 1.1M units).

This matters for scale analysis. A company improving gross margin (rising operating leverage on COGS) but holding operating expenses flat will see operating income rise faster than revenue. This is the classic "hockey stick" growth profile that high-growth companies achieve.

Real-world COGS insights

Tesla: Often reports low COGS percentages relative to auto manufacturers, signaling either (1) high pricing power, (2) a favorable mix of higher-margin models, or (3) accounting choices (capitalizing manufacturing inefficiencies vs. expensing them). Comparing Tesla's COGS methodology to traditional automakers reveals substantial differences in valuation.

Amazon: AWS (cloud services) has much higher gross margins (~30%) than Amazon Retail (~40%), yet both are rolled into a single COGS line in some disclosures. Breaking out segment COGS reveals that AWS is far more profitable than retail, which is crucial for valuation.

Nike: Reports wholesale COGS (cost of goods shipped to retailers) separately from DTC (direct-to-consumer) COGS. DTC has lower COGS as a percentage because Nike sells at full price and owns the customer. Wholesale includes distributor markups, so appears higher. Understanding both is essential.

Pharmaceutical companies: COGS looks low because it's mostly research and development of the drug, which is capitalized and amortized over many years (not expensed upfront as COGS). Once a drug patent expires and generics flood the market, COGS as a percentage rises because the expensive R&D asset is fully amortized or written off.

A diagram: COGS waterfall

Common mistakes when analyzing COGS

  1. Confusing COGS with total costs. COGS is only direct costs; operating expenses are additional costs that are necessary but variable.

  2. Not adjusting for inventory method differences. Two companies might have the same operational efficiency but report different COGS due to FIFO vs LIFO. Investors must adjust for this.

  3. Ignoring the gross margin trend. A company's gross margin is more important than its absolute COGS number. Track it quarterly.

  4. Not comparing COGS across competitors. Two companies selling similar products should have similar COGS percentages. A significant difference warrants investigation.

  5. Missing one-time COGS items. Inventory writedowns, asset impairments, or supply chain disruptions can inflate COGS temporarily. Distinguishing one-time from recurring items is essential.

FAQ

Q: Is COGS the same as cost of revenue?
A: Yes, they're often used interchangeably. Some service companies prefer "cost of revenue" because they don't manufacture goods, but the concept is identical.

Q: Why isn't R&D included in COGS?
A: R&D isn't tied directly to the production of a specific unit. It benefits current and future products. COGS includes only direct, variable costs per unit.

Q: Can COGS be higher than revenue?
A: Yes, if a company is operating at a loss on each unit (below-cost sales for market share) or if it has inventory write-downs. This would be a major red flag.

Q: How do software companies calculate COGS?
A: Software COGS includes hosting/server costs, customer support labor, payment processing, and sometimes amortization of capitalized development costs. It does NOT include the initial development cost (R&D).

Q: If a company's COGS goes down but revenue is flat, is that good?
A: Yes, declining COGS with stable revenue means improving margins and profitability. It signals operational efficiency improvement.

Q: What is "gross profit per unit"?
A: Gross profit divided by units sold. A company might sell more units (rising revenue) but with declining gross profit per unit (falling margins), which is negative.

Q: How do franchise companies report COGS?
A: COGS for franchisors is typically small (franchisees operate stores). Revenue is the royalty collected. COGS might include marketing support and materials provided to franchisees.

Summary

Cost of goods sold is the direct cost of producing or delivering what the company sells. It is the first expense subtracted from revenue on the income statement and determines gross profit. Understanding COGS is crucial because it reveals the inherent profitability of the business before operating expenses are factored in. COGS varies by industry—retailers have low gross margins (high COGS %), software has high gross margins (low COGS %), and most manufacturers fall in between. Gross margin is the key metric: it shows pricing power and operational efficiency. Rising COGS as a percentage of revenue signals pricing pressure or cost inflation, which is a red flag. Inventory accounting methods (FIFO, LIFO, weighted average) affect COGS, especially in inflationary periods, so investors must check the footnotes. Comparing COGS percentages across competitors reveals competitive positioning and cost management. COGS red flags include sudden changes, deteriorating trends, and inventory issues that inflate or deflate reported costs. Sophisticated investors track gross margin trends quarterly and investigate any meaningful deviation from historical patterns.

Next

Gross profit and gross margin: the first signal