Every business that makes or resells a product has a number that sits directly below revenue on the income statement. Before operating expenses, before interest, before taxes — there is COGS. It is the first cost line a business must cover just to break even, and it is frequently the largest.

COGS tells you how much it actually costs to produce and deliver the goods a business sold during a period. Get it wrong — in the accounting, in the analysis, or in the management — and every profitability metric downstream is distorted. Get it right, and you have one of the clearest windows into whether a business is becoming more or less efficient at its core activity.

This article explains what COGS includes, how the formula works, why the inventory method you choose changes the number, and what a rising or falling COGS tells you about a business's health.

What Is COGS?

COGS Cost of Goods Sold — the direct costs a business incurs to produce the goods it sells during a specific accounting period.

COGS is a measure of production cost — not all costs. It captures only the expenses directly tied to making or acquiring the products sold. Rent for the company's head office, the CEO's salary, advertising spend — none of these appear in COGS, because none of them are direct inputs into production.

Think of it this way: if your business makes custom furniture, your COGS covers the wood, the screws, the varnish, and the wages of the craftspeople who build each piece. It does not cover the electricity in your showroom, your website hosting, or the cost of the accountant who processes payroll. Those are operating expenses.

This distinction matters enormously in financial analysis. COGS is subtracted from revenue to give gross profit — which tells you how efficiently a business produces its output before layering on overhead. Operating expenses come after, producing operating profit. The two layers measure different things.

What COGS Includes (and Excludes)

The boundary between what belongs in COGS and what belongs in operating expenses is one of the most common sources of confusion in accounting. Here is a clear breakdown.

What Is Included

COGS covers every cost that is directly and exclusively attributable to producing the goods sold:

Cost Type Example In COGS?
Raw materials Steel for a manufacturer, flour for a bakery, fabric for a clothing brand ✓ Yes
Direct labour Wages for factory workers, assembly line staff, kitchen staff at a restaurant ✓ Yes
Manufacturing overhead Factory rent, production equipment depreciation, utilities directly tied to production ✓ Yes
Freight inbound Shipping cost to receive raw materials at the factory ✓ Yes
Purchase cost (retail/wholesale) Wholesale price paid for goods resold without modification ✓ Yes
Selling & admin salaries Sales team wages, CEO pay, HR staff ✗ No — OpEx
Marketing & advertising Digital ads, print campaigns, trade show costs ✗ No — OpEx
Office overhead Head office rent, insurance, legal fees ✗ No — OpEx
Interest expense Loan interest, bond coupon payments ✗ No — below operating profit
Service businesses and COGS

Pure service businesses — consulting firms, law firms, software-as-a-service companies — often report "Cost of Revenue" or "Cost of Services" rather than COGS, but the concept is the same: direct costs tied to delivering the service. For a SaaS company, this typically includes hosting infrastructure, third-party API costs, and customer support salaries for implementation teams.

The COGS Formula

COGS is calculated using beginning and ending inventory balances, plus any purchases or production costs added during the period. The logic is straightforward: you start with what you had, add what you made or bought, then subtract what you still have left.

Formula — Cost of Goods Sold
COGS = Beginning Inventory + Purchases (or Production Costs) − Ending Inventory

Beginning Inventory is from last period's balance sheet. Ending Inventory is counted at period-end. Purchases includes all direct costs added to inventory during the period.

The intuition: goods available for sale equals beginning inventory plus everything added during the period. Of that pool, some is still sitting in the warehouse at period-end (ending inventory). What was sold is the remainder — and that remainder's cost is COGS.

+ Beginning Inventory Value of unsold goods at start of period
+ Purchases / Production Raw materials, direct labour, manufacturing overhead added during the period
= Goods Available for Sale Total inventory that could have been sold
Ending Inventory Value of unsold goods remaining at end of period
= COGS Cost assigned to goods that were actually sold

Notice that COGS is a derived figure — it is what remains after removing the cost of unsold inventory. This means inventory valuation directly determines COGS. And that brings us to the most technically important aspect of COGS: how you assign costs to units sold when prices change over time.

Three Inventory Costing Methods

When a business buys the same product at different prices across multiple orders, it needs a rule for deciding which cost attaches to each unit sold. Three methods dominate: FIFO, LIFO, and Weighted Average Cost. Each produces a different COGS — and therefore a different gross profit — from identical transactions.

FIFO
First In, First Out

The oldest inventory cost is assigned to goods sold first. Ending inventory reflects the most recent (typically higher) prices. Common globally.

LIFO
Last In, First Out

The most recent inventory cost is assigned to goods sold first. Permitted under US GAAP; prohibited under IFRS. Lowers taxable income in inflationary environments.

Weighted Average Cost
Average Cost

A single blended cost per unit is calculated by dividing total inventory cost by total units. Applied uniformly to every unit sold and every unit remaining.

Why the Choice of Method Matters

The method is not just an accounting technicality. In a period of rising prices — which describes most industries in most years — FIFO produces lower COGS and higher reported profit than LIFO, because older (cheaper) costs flow through to sales first. LIFO does the reverse: higher COGS, lower reported profit, but a tax advantage. Weighted average lands between the two.

This means you cannot meaningfully compare COGS or gross margin across two companies if they use different inventory methods. Always check the accounting policy note in the financial statements before drawing conclusions.

"Two companies with identical purchasing costs and identical sales volumes can report materially different profits — simply because one uses FIFO and the other uses LIFO. The accountant's choice of method is not neutral."

Worked Example: FIFO vs LIFO vs Weighted Average

Let's make this concrete. Imagine a business — Northgate Electronics — that sells memory modules. During Q3, it makes three separate purchases and sells 700 units.

Purchase history, Q3:

Date Units Purchased Cost per Unit Total Cost
July 1 (opening) 200 units $18.00 $3,600
August 14 400 units $21.50 $8,600
September 22 300 units $24.00 $7,200

Total available: 900 units at a total cost of $19,400. Units sold during Q3: 700. Units remaining: 200.

Method 1 — FIFO

Under FIFO, the first 200 units sold carry the July opening cost ($18.00). The next 400 units sold carry the August cost ($21.50). The final 100 sold carry the September cost ($24.00).

Northgate Electronics — Q3 FIFO Calculation
Units Sold (Cost Assignment)
200 units × $18.00 (July batch)$3,600
400 units × $21.50 (August batch)$8,600
100 units × $24.00 (Sep batch — partial)$2,400
COGS (FIFO)$14,600 ✓
Ending Inventory
200 units × $24.00 (remaining Sep batch)$4,800
Check: COGS + Ending Inventory$19,400

Under FIFO, ending inventory reflects the most recent purchase price ($24.00). COGS is lower because older, cheaper costs are matched against sales first. This produces the highest gross profit in an inflationary environment.

Method 2 — LIFO

Under LIFO, the most recent 300 units (September, $24.00) are sold first, then 400 from August ($21.50). The oldest July batch stays in inventory.

Northgate Electronics — Q3 LIFO Calculation
Units Sold (Cost Assignment)
300 units × $24.00 (Sep batch — most recent)$7,200
400 units × $21.50 (Aug batch)$8,600
COGS (LIFO)$15,800 ✓
Ending Inventory
200 units × $18.00 (July batch — oldest)$3,600
Check: COGS + Ending Inventory$19,400

LIFO produces COGS of $15,800 — $1,200 more than FIFO. This higher COGS reduces taxable income, which is why US companies in inflationary sectors often prefer LIFO. The trade-off: ending inventory looks artificially cheap at the old July cost.

Method 3 — Weighted Average Cost

Calculate a single blended cost per unit, then apply it uniformly to both sold and unsold units.

Northgate Electronics — Q3 Weighted Average Calculation
Blended Cost Calculation
Total cost of all inventory$19,400
Total units available900 units
Weighted average cost per unit$21.56
Applied to Sales and Ending Inventory
700 units sold × $21.56$15,089
200 units remaining × $21.56$4,311
COGS (Weighted Avg)$15,089 ✓

Weighted average smooths price fluctuations across the period. COGS of $15,089 falls between FIFO ($14,600) and LIFO ($15,800). This method is common in industries where distinguishing individual inventory batches is impractical — grain trading, oil refining, chemicals.

💡
LIFO Reserve

When comparing a LIFO company with a FIFO company, analysts add back the "LIFO reserve" — the cumulative difference between LIFO and FIFO inventory values disclosed in the notes — to convert the LIFO company's balance sheet inventory to a FIFO basis. This makes the comparison apples-to-apples.

COGS on the Income Statement

COGS appears on the income statement immediately below revenue. The structure is identical across virtually every company that sells physical goods:

Revenue Total sales for the period
COGS Direct cost of goods sold
= Gross Profit What remains before operating expenses

From gross profit, operating expenses (SG&A, R&D, depreciation of non-production assets) are subtracted to reach operating profit (EBIT). Below that comes interest expense and taxes. COGS is the first and typically largest deduction — setting the ceiling for everything that follows.

For investors reading a 10-K or annual report, COGS is usually a single line. For management accounts and segment reporting, it may be broken into sub-components: materials, direct labour, and production overhead. This granularity is where genuine operational insight lives.

The Gross Margin Connection

COGS and gross margin are two sides of the same coin. Gross margin is simply gross profit expressed as a percentage of revenue:

Formula — Gross Margin
Gross Margin % = (Revenue − COGS) ÷ Revenue × 100

Equivalently: Gross Margin % = 1 − (COGS ÷ Revenue). A 60% gross margin means every $1 of revenue retains $0.60 after production costs.

This percentage is one of the most-watched metrics in financial analysis because it reflects pricing power and operational efficiency simultaneously. A company that can hold its gross margin flat while growing revenue is doing two things right: selling at strong prices and keeping production costs in check.

A Tale of Two Margins

Consider two competing software hardware companies, both generating $50 million in annual revenue.

Metric Company A Company B
Revenue $50,000,000 $50,000,000
COGS $18,500,000 $29,000,000
Gross Profit $31,500,000 $21,000,000
Gross Margin 63% 42%

Both have the same revenue, but Company A's production machine is far more efficient. Every dollar of revenue retains 63 cents before covering any overhead. Company B retains only 42 cents — meaning it has 21 cents less per dollar to cover the same kinds of selling, administrative, and financing costs. At scale, that gap compounds into a significant profit and reinvestment advantage.

COGS Across Industries

COGS ratios vary enormously by sector, which is why cross-industry comparisons are almost meaningless. A manufacturer at 70% COGS-to-revenue is not "worse" than a software company at 15% — they're in structurally different businesses.

Industry Typical COGS % of Revenue Key Driver
Grocery / Food retail 70–80% Low-margin commodity products, high volume
Automobile manufacturing 75–85% Steel, components, and direct labour-intensive assembly
Pharmaceuticals 20–35% High IP value, low marginal production cost once R&D is sunk
Software (SaaS) 10–25% Hosting, support, and minimal incremental delivery cost
Luxury goods 25–45% Craftsmanship premium, brand pricing power offsets material cost
Restaurants 28–35% Food and beverage cost; labour typically in operating expenses
Electronics / Consumer hardware 50–70% Component costs, assembly, supply chain exposure

The right benchmark is always a company's own trend over time, plus peers in the same sub-sector. A supermarket with a 72% COGS-to-revenue ratio deserves a very different reaction than a medical device company with the same ratio.

What a Rising COGS Really Signals

When COGS rises faster than revenue — meaning the COGS-to-revenue ratio expands — gross margin contracts. This is one of the most reliable early warnings of trouble in a product business. But the cause matters enormously before drawing conclusions.

Reading the Signal Correctly

1

Input cost inflation

Raw material prices have risen faster than the company can pass through to customers. Common in commodity-exposed industries (food, packaging, metals). A temporary headwind if the company has pricing power; a structural problem if it doesn't.

2

Product mix shift

The business is selling more of its lower-margin products and less of its high-margin ones. Revenue holds steady, but average COGS per dollar of revenue rises. Often visible in segment disclosures before it hits the consolidated gross margin line.

3

Operational inefficiency

Scrap rates, rework, production downtime, or labour overtime costs are rising. This reflects an internal problem — poor process management — rather than an external market condition. It typically requires operational intervention, not a pricing response.

4

Deliberate margin investment

Sometimes a rising COGS ratio is intentional — the business is investing in higher-quality materials, faster delivery, or better customer service built into the product cost. Context from management commentary is essential here: the same number can mean deterioration or deliberate positioning.

5

Inventory write-downs

Spoiled, obsolete, or unsellable inventory gets written down — reducing the balance sheet value of inventory and increasing COGS. A sudden spike in COGS without a matching revenue increase often has an inventory write-down hiding inside it.

Watch Out: Comparing COGS Across Reporting Periods

If a company changes its inventory accounting method — switching from LIFO to FIFO, for example — COGS figures are not comparable across that boundary without adjusting for the change. Companies are required to disclose such changes and restate prior periods under most accounting standards, but the adjustment is often buried in the notes.

Common Misconceptions

COGS seems straightforward until you encounter one of these persistent misunderstandings:

Key Takeaways

  • COGS captures only direct production costs — raw materials, direct labour, and manufacturing overhead. Operating expenses (SG&A, marketing, admin) are categorically excluded.
  • The COGS formula is straightforward: Beginning Inventory + Purchases − Ending Inventory = COGS. What matters is how you value the inventory that flows through.
  • Inventory method changes the number materially. In an inflationary period: FIFO → lowest COGS, highest profit. LIFO → highest COGS, lowest profit (and tax bill). Weighted average sits between both.
  • LIFO is prohibited under IFRS — only US GAAP allows it. Never compare a LIFO company with a FIFO company without adjusting for the LIFO reserve.
  • COGS benchmarks are sector-specific. A 70% COGS ratio is unremarkable in grocery, alarming in SaaS. Always compare against industry peers and prior periods.
  • Rising COGS-to-revenue is a diagnostic, not a verdict. It could mean input cost inflation, product mix shifts, operational inefficiency, or deliberate quality investment — check the notes and management commentary before concluding anything.

Quick Quiz

Four questions to check your understanding. Click an answer to reveal the explanation.

1. A company has beginning inventory of $40,000, purchases $85,000 of goods during the quarter, and ends with $28,000 of inventory remaining. What is COGS?

Answer: B. COGS = Beginning Inventory ($40,000) + Purchases ($85,000) − Ending Inventory ($28,000) = $97,000. Option A ($125,000) is goods available for sale before subtracting ending inventory. Option D ($85,000) ignores beginning inventory entirely. The formula always starts with what you already had, adds what you acquired, then removes what you still have.

2. Which inventory costing method is prohibited under IFRS but permitted under US GAAP?

Answer: B. LIFO (Last In, First Out) is the only major inventory method prohibited under IFRS, making it impossible to compare a US LIFO company with an IFRS-reporting peer on a like-for-like basis without a LIFO reserve adjustment. FIFO and Weighted Average are both permitted under IFRS and US GAAP. Takeaway: always check the inventory method note when comparing companies across different reporting jurisdictions.

3. In a period of rising input prices, which inventory method produces the lowest COGS and highest reported gross profit?

Answer: A. Under FIFO in an inflationary environment, older (cheaper) costs flow to COGS first, leaving newer (more expensive) costs in ending inventory. This minimises COGS and maximises reported profit. LIFO does the opposite — it matches the most recent high costs against sales, producing the highest COGS and lowest profit. Takeaway: in a rising-cost world, method choice is a real earnings management lever.

4. Which of the following costs would NOT be included in COGS for a manufacturing company?

Answer: C. Sales team salaries are a selling expense — they belong in operating expenses (SG&A), not COGS. Factory workers' wages (direct labour), raw materials, and factory utilities (manufacturing overhead) all go directly into COGS because they are part of the production process. The boundary test: does this cost exist because we're making the product, or because we're running the business? If the latter, it's an operating expense.