Sub topic 2
Goods available for sale, COGS, and ending inventory
This chapter assumes you know debits and credits, can read an income statement and balance sheet, and know that inventory is stock held for resale. It builds the one equation that every cost flow method in this tutorial depends on.
The cost pool
A business can sell only what it has. The units available during a period are the units on hand at the start (beginning inventory) plus the units bought during the period (purchases). Their costs add up the same way:
Cost of goods available for sale = Beginning inventory + Net purchases
Net purchases means purchases plus freight-in (shipping you pay to receive goods), minus purchase returns, allowances, and purchase discounts. Freight-out, which is the cost of delivering goods to customers, is a selling expense and is not part of this total.
Goods available for sale is a pool of cost. At the end of the period, every dollar in that pool goes to one of two places:
- Cost of goods sold (COGS) is the cost of the units sold. It is an expense on the income statement.
- Ending inventory is the cost of the units still held. It is an asset on the balance sheet.
Goods available for sale = COGS + Ending inventory
Rearranged, this gives COGS = Goods available − Ending inventory. Which side you can measure directly depends on the inventory system, which a later chapter covers.
A worked example
A shop starts the period with 100 units at $10. It buys 200 units at $12 on day 5 and 100 units at $14 on day 15. It sells 250 units during the period.
| Layer | Units | Unit cost | Total cost |
|---|---|---|---|
| Beginning inventory | 100 | $10 | $1,000 |
| Purchase, day 5 | 200 | $12 | $2,400 |
| Purchase, day 15 | 100 | $14 | $1,400 |
| Goods available for sale | 400 | $4,800 |
Units are easy to track: 400 available − 250 sold = 150 units remain. The open question is which dollars belong to those 250 sold units and which to the 150 remaining units. The $4,800 is fixed, so any dollar assigned to COGS leaves ending inventory, and the reverse.
layers = [(100, 10), (200, 12), (100, 14)] # (units, unit_cost)
units_sold = 250
units_available = sum(u for u, _ in layers)
goods_available = sum(u * c for u, c in layers)
ending_units = units_available - units_sold
print("Units available:", units_available)
print("Cost of goods available:", goods_available)
print("Units in ending inventory:", ending_units)
# Any method must split the same $4,800 between COGS and ending inventory.
for cogs in (2800, 3000, 3200):
print("COGS", cogs, "-> ending inventory", goods_available - cogs)Running it prints:
Units available: 400
Cost of goods available: 4800
Units in ending inventory: 150
COGS 2800 -> ending inventory 2000
COGS 3000 -> ending inventory 1800
COGS 3200 -> ending inventory 1600The three COGS values are the results of the three methods covered later. Their spread comes only from how the same $4,800 is divided.
Common errors
- Using the wrong cost for goods available. Leaving out freight-in or forgetting to subtract purchase returns changes the pool, and every method inherits the error.
- Confusing units with dollars. The unit counts must reconcile (available − sold = remaining) before any costing starts.
- Treating the split as free. Lower COGS means higher ending inventory by exactly the same amount. Gross profit and total assets move together.
- Counting sales revenue anywhere in the pool. The pool is measured at cost, never at selling price.
Exercise
A store has 50 units at $8 in beginning inventory. It buys 150 units at $9, then 100 units at $10. It sells 220 units, and its cost method gives COGS of $2,100. What are the cost of goods available for sale, the units in ending inventory, and the cost of ending inventory?
Show answer
Goods available = 50 × $8 + 150 × $9 + 100 × $10 = $400 + $1,350 + $1,000 = $2,750. Units available = 300, so ending inventory is 300 − 220 = 80 units. Ending inventory cost = $2,750 − $2,100 = $650.