Cost of Goods Sold (COGS)COGS

Cost of goods sold is the direct cost of the products a company sold in a period, such as materials, production labour and factory overhead. Revenue minus COGS gives gross profit.

Every product a company sells cost something to make or buy. Cost of goods sold adds up those direct costs for the units actually sold in the period, and it is usually the first expense on the Income Statement. Subtract it from Revenue and you get gross profit, the money left to pay for everything else. This entry shows how COGS is calculated, what goes in and out of it, and why the inventory method changes the number.

Category
Fundamentals and Macroeconomics
Reading time
5 min
Also called
Cost of sales, Cost of revenue, Cost of goods sold formula
Updated

COGS in plain words

COGS is the direct cost of producing what was sold: materials, direct labour and direct factory overhead.1 Costs of selling and running the company, such as advertising and management salaries, are not COGS; they go into SG&A further down the income statement.1 See Selling, General and Administrative Expenses (SG&A).

On the income statement, cost of sales is subtracted from net revenue to give a subtotal called gross profit.2 Goods bought but still unsold sit in inventory and only become COGS when they are sold.1

How to calculate COGS, step by step

  1. Start with opening inventory

    Take the cost of inventory on hand at the start of the period, which is usually last period’s closing inventory.3

  2. Add purchases

    Add the cost of goods bought during the period.3

  3. Add production costs

    For makers, add labour, materials and other costs such as freight-in and overhead.3

  4. Get goods available

    The total so far is the cost of goods available for sale.3

  5. Subtract closing inventory

    COGS = goods available − closing inventory.3

  6. Apply a cost formula

    Decide which unit costs leave inventory first: FIFO, LIFO, weighted average or specific identification.1 See Last In, First Out (LIFO).

Worked examples

Example 1 — The inventory formula

COGS

A hypothetical retailer starts the year with $40,000 of inventory, buys $150,000 more and ends the year with $30,000 in stock.

Example 1 — The inventory formula — calculation
Opening inventory$40,000
Plus purchases$150,000
Goods available$40,000 + $150,000 = $190,000
Less closing inventory$30,000
COGS$190,000 − $30,000 = $160,000

Only the goods that left the shelves count as COGS; the $30,000 still in stock stays on the balance sheet.

Example 2 — From COGS to gross profit

Gross profit

The same hypothetical retailer had net revenue of $250,000.

Example 2 — From COGS to gross profit — calculation
Net revenue$250,000
Less COGS$160,000
Gross profit$250,000 − $160,000 = $90,000
Gross margin$90,000 ÷ $250,000 = 36%

Each dollar of sales left 36 cents to cover operating costs, interest, tax and profit. See Profit Margins.

Example 3 — FIFO, LIFO and average cost

Method matters

A hypothetical shop buys three identical units at $10, $12 and $14, in that order, and sells two.

Example 3 — FIFO, LIFO and average cost — calculation
FIFO (oldest first)$10 + $12 = $22
LIFO (newest first)$14 + $12 = $26
Average cost per unit$36 ÷ 3 = $12
Weighted average COGS2 × $12 = $24

With rising prices, LIFO gives the highest COGS and FIFO the lowest, so the same sales show different gross profit.

COGS vs. operating expenses

AspectTypical itemsSubtracted to reach
COGSMaterials, direct labour, factory overheadGross profit
SG&AAdvertising, management salariesOperating income. See EBIT
Interest and taxDebt costs, income taxNet Income

Why COGS matters

  • Gross profit

    COGS decides how much of each sale is left after making the product. See Gross and Net Profit.

  • Pricing power

    If COGS rises faster than revenue, the company is struggling to pass costs on to customers.

  • Inventory health

    COGS is the starting point for Inventory Turnover, which shows how fast stock sells.

  • Comparing companies

    Check which inventory method each uses before comparing gross margins.

Advantages and disadvantages

Advantages

  • Shows the direct cost of what was sold.
  • Simple formula based on inventory records.
  • Leads straight to gross profit and gross margin.
  • Tracks input-cost pressure over time.

Disadvantages

  • Depends on the inventory cost method chosen.
  • What counts as COGS varies between companies.
  • Inventory write-downs can distort a single period.
  • Service firms may report cost of revenue differently.

Going deeper

Read as far as you need. Each level builds on the one before it.

Why unsold goods are not COGS

Beginner

If a shop buys 100 shirts and sells 60, only the cost of the 60 shirts sold is matched against this period’s sales. The other 40 stay in inventory as an asset until they are sold.

Inventory cost formulas

Intermediate

Under IAS 2, interchangeable items use the first-in, first-out or weighted average cost formula, while items that are not interchangeable use specific identification.4 The four main methods named in practice are FIFO, LIFO, weighted average and specific identification.1

Write-downs and timing

Advanced

IAS 2 measures inventory at the lower of cost and net realisable value, and recognises its carrying amount as an expense in the period the related revenue is recognised.4 So a fall in the value of unsold stock can raise expenses before the goods are even sold.

Common mistakes

  1. Including all expenses

    Marketing and head-office costs belong in SG&A, not COGS.

  2. Counting purchases as COGS

    Only goods sold count; unsold stock stays in inventory.

  3. Ignoring the inventory method

    FIFO and LIFO give different COGS when prices change.

  4. Comparing across industries

    A software firm and a grocer have very different cost structures.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1Opening inventory is $20,000, purchases are $80,000 and closing inventory is $25,000. What is COGS?
Q2Which cost is NOT part of COGS?

Key points to remember

  1. COGS is the direct cost of the goods a company sold in the period.
  2. COGS = opening inventory + purchases and production costs − closing inventory.
  3. Revenue minus COGS equals gross profit.
  4. Selling and administrative costs are not part of COGS.
  5. The inventory method (FIFO, LIFO, average) changes reported COGS.

Frequently asked questions

Is cost of sales the same as COGS?

Yes, in most cases the terms mean the same thing. Some companies, especially service firms, call it cost of revenue.

Does depreciation belong in COGS?

Sometimes. Depreciation of production equipment can be included, depending on the company’s accounting policy.

Why does inflation raise COGS under LIFO?

LIFO charges the newest, most expensive units to COGS first, so rising prices show up in costs sooner.

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. Corporate Finance Institute. Cost of Goods Sold (COGS) (opens in a new tab) Checked .
  2. SEC. Beginners' Guide to Financial Statements (opens in a new tab) Checked .
  3. Internal Revenue Service. Publication 334, Tax Guide for Small Business (Cost of Goods Sold) (opens in a new tab) Checked .
  4. IFRS Foundation. IAS 2 Inventories (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.