Skip to content
AccountancyPath

BusinessModule 2: Costs and pricingIntermediate5 min read

Inventory and Cost of Goods Sold (COGS)

Calculate cost of goods sold, compare FIFO, weighted average and LIFO, track periodic vs perpetual stock, handle shrinkage, and measure inventory turnover.

Lesson 3 of 7
Course outline (7 lessons)

Before this lesson:Revenue, Expenses and ProfitFixed vs Variable Costs

When a shop or manufacturer buys stock, that purchase is not an expense right away. Unsold stock sits on the balance sheet as an asset called inventory. Only when an item is sold does its cost move onto the income statement as cost of goods sold (COGS).

The COGS formula

For any period, everything you started with plus everything you bought must either still be in stock or have left the building as COGS:

Formula · Cost of goods sold

COGS = Opening inventory + Purchases − Closing inventory

Opening inventory
cost of stock on hand at the start of the period
Purchases
net cost of stock bought during the period (including inbound freight, minus returns and discounts)
Closing inventory
cost of unsold stock left at the end of the period

Getting closing inventory wrong directly distorts gross profit (Revenue − COGS). Overstating closing inventory understates COGS and makes profit look artificially high.

Valuing inventory: FIFO, weighted average and LIFO

If you buy identical units at different prices during the month, you need a consistent cost-flow assumption to split total cost between COGS and closing inventory:

  • FIFO (First-In, First-Out): assumes the oldest stock is sold first, so closing inventory reflects the most recent purchase prices.
  • Weighted average cost: spreads the total cost of goods available evenly across all units available.
  • LIFO (Last-In, First-Out): assumes the newest stock is sold first. LIFO is permitted under US GAAP, but not permitted under IFRS (IAS 2 prohibits it) because it can leave outdated historical costs on the balance sheet.
Worked example

Comparing cost methods: Northridge Trail Supply (fictional)

Northridge Trail Supply, a fictional outdoor-gear shop, tracks one product—insulated hiking bottles—during May using periodic month-end costing. It sells 260 bottles at $25 each, earning $6,500 in revenue.

Date Batch Units Unit cost Total cost
1 May Opening inventory 100 $10.00 $1,000
10 May Purchase 1 150 $12.00 $1,800
22 May Purchase 2 150 $14.00 $2,100
Total Goods available for sale 400 $4,900

With 260 units sold, 140 units remain in closing inventory (400 − 260).

  1. FIFO: The 260 units sold come from the oldest batches: (100 × $10) + (150 × $12) + (10 × $14) = $2,940 COGS. Closing inventory is 140 × $14 = $1,960.
  2. Weighted average: Average unit cost = $4,900 ÷ 400 = $12.25. COGS = 260 × $12.25 = $3,185. Closing inventory = 140 × $12.25 = $1,715.
  3. LIFO (US GAAP comparison only): The 260 units sold come from the newest batches: (150 × $14) + (110 × $12) = $3,420 COGS. Closing inventory is (100 × $10) + (40 × $12) = $1,480.
Method Closing inventory COGS Gross profit Gross margin
FIFO $1,960 $2,940 $3,560 54.8%
Weighted average $1,715 $3,185 $3,315 51.0%
LIFO (not permitted under IFRS) $1,480 $3,420 $3,080 47.4%

Every row reconciles to $4,900 of goods available (Closing inventory + COGS) and $6,500 of revenue (COGS + Gross profit). Notice that the physical bottles and cash flow are identical; only the cost allocation changes when purchase prices rise.

Periodic vs perpetual inventory systems

Businesses track stock in one of two ways:

  • Periodic system: purchases go into a purchases account during the period, and COGS is calculated only at month-end or year-end after a physical count. Simple for very small businesses, but it hides stock losses until count day.
  • Perpetual system: point-of-sale or ERP software updates inventory and COGS automatically on every purchase and every sale. It gives real-time stock levels and margins, though it still requires physical counts to catch discrepancies.

Stock counts and shrinkage

Even with a perpetual system, physical stock rarely matches the computer record perfectly. Shrinkage is the gap caused by theft, damage, spoilage, supplier short-shipments or recording errors.

Suppose Northridge Trail Supply’s perpetual ledger shows $1,960 of hiking bottles at month-end, but a physical count finds $1,820 on the shelves. The $140 shortage must be written off so the balance sheet does not carry stock that is no longer there:

Adjusting entry for $140 of inventory shrinkage
AccountDebit (Dr)Credit (Cr)
Cost of Goods Sold (Inventory Shrinkage)$140
Inventory$140
Total✓ Balanced$140$140

Many retail and warehouse businesses use cycle counting—counting a rotating slice of items every week—rather than shutting down once a year for a full count.

Inventory turnover and days on hand

Holding too little stock loses sales; holding too much ties up cash and invites obsolescence. Two ratios measure how fast stock moves:

Formula · Inventory turnover

COGS ÷ Average inventory

Average inventory
(Opening inventory + Closing inventory) ÷ 2
Formula · Days inventory outstanding (DIO)

365 ÷ Inventory turnover

If Northridge Trail Supply has annual COGS of $180,000, opening inventory of $26,000 and closing inventory of $34,000, its average inventory is $30,000. Turnover is $180,000 ÷ $30,000 = 6.0 times a year, and DIO is 365 ÷ 6.0 = 60.8 days—roughly two months of stock sitting on shelves before selling. Compare DIO against industry norms and your supplier payment terms in managing working capital.

Common mistakes

  • Dividing revenue (instead of COGS) by average inventory when calculating turnover, which overstates how fast stock moves because revenue includes your markup.
  • Skipping physical counts because you use perpetual software, allowing shrinkage and phantom stock to build up unnoticed.
  • Keeping unsaleable or expired stock at full cost instead of writing it down to what it can actually be sold for (net realisable value).
  • Omitting inbound freight and import duties from inventory cost, which understates unit costs and skews product pricing.

Real-world application

Check your gross margin and DIO by product category at least once a quarter. A product with a high markup can still drain cash if it takes 150 days to sell or suffers heavy spoilage. Use the profit margin calculator to test how unit cost changes affect gross margin, and see how stock spending hits the bank balance ahead of sales in the coffee shop simulator.

Recap

  • Inventory is an asset until sold; its cost then becomes COGS (Opening inventory + Purchases − Closing inventory).
  • FIFO and weighted average are accepted under both IFRS and US GAAP; LIFO is allowed under US GAAP only and prohibited under IFRS.
  • Perpetual systems track stock in real time, while periodic systems calculate COGS after physical counts—both require counts to catch shrinkage.
  • Inventory turnover and DIO show how quickly stock converts into sales and how long cash stays tied up on the shelf.

Try it yourself

Active recall

Quick check · Test yourself

Work out each answer in your head first, then reveal the explanation and mark whether you got it right.

  1. 1A fictional hardware shop starts the quarter with $24,000 of inventory, purchases $68,000 of stock and ends with $20,000 on the shelves. What is its cost of goods sold?

    Show worked answer

    COGS = Opening inventory + Purchases − Closing inventory = $24,000 + $68,000 − $20,000 = $72,000.

  2. 2When supplier prices are rising, does FIFO or weighted average report higher gross profit, and why?

    Show worked answer

    FIFO reports higher gross profit. It assigns the older, lower unit costs to COGS and leaves the newer, higher costs in closing inventory, resulting in lower COGS than weighted average.

  3. 3A retailer reports annual COGS of $240,000, opening inventory of $35,000 and closing inventory of $45,000. What are its inventory turnover and days inventory outstanding (365-day year)?

    Show worked answer

    Average inventory = ($35,000 + $45,000) ÷ 2 = $40,000. Inventory turnover = $240,000 ÷ $40,000 = 6.0 times per year. Days inventory outstanding = 365 ÷ 6.0 = 60.8 days (about 61 days).

Key terms in this lesson

Lesson 3 of 7 · Business

Finished this lesson?

Mark it complete to track your progress through the course. Progress is saved in this browser only.

Previous lesson: Fixed vs Variable Costs

Subject GuideEntrepreneurship & Business Finance

Marcus Vance

Focuses on the numbers founders check every Monday morning to stay default-alive.

  • Startup Unit Economics
  • Cash Runway & Pricing
  • Cap Tables & Fundraising

More lessons with Marcus

Published:

Educational content only—not accounting, tax, legal or investment advice. See our editorial policy or report an error via our corrections policy.

Search