Sub topic 8
What happens when prices rise or fall
This chapter assumes you can compute COGS with FIFO, LIFO, and weighted average from the earlier chapters. It shows how the unit-cost trend decides which method reports the higher or lower number.
The rule of thumb
Goods available for sale is fixed by what the company bought. The method only decides how that total splits between COGS (the income statement) and ending inventory (the balance sheet). When costs change over time, the layers have different costs, so the split moves.
- FIFO sends the oldest costs to COGS and leaves the newest costs in inventory.
- LIFO sends the newest costs to COGS and leaves the oldest costs in inventory.
- Weighted average blends all costs, so its results sit between the other two.
Rising prices
Use the running example: 100 units at $10, 200 at $12, and 100 at $14, with 250 units sold. The goods available for sale total $4,800. Assume sales revenue of $5,000, and a 25% tax rate on gross profit.
| Method | COGS | Ending inventory | Gross profit | Tax at 25% |
|---|---|---|---|---|
| FIFO | $2,800 | $2,000 | $2,200 | $550 |
| Weighted average | $3,000 | $1,800 | $2,000 | $500 |
| LIFO | $3,200 | $1,600 | $1,800 | $450 |
With rising prices, LIFO gives the highest COGS, the lowest profit, the lowest inventory, and the lowest tax. FIFO gives the opposite. Tax differs by $100 between FIFO and LIFO, which is 25% of the $400 COGS gap.
Falling prices
Now reverse the purchase order: 100 units at $14, then 200 at $12, then 100 at $10. The totals are the same, and 250 units are sold.
| Method | COGS | Ending inventory | Gross profit |
|---|---|---|---|
| FIFO | $3,200 | $1,600 | $1,800 |
| Weighted average | $3,000 | $1,800 | $2,000 |
| LIFO | $2,800 | $2,000 | $2,200 |
The ranking flips. FIFO now has the highest COGS and lowest profit, and LIFO has the lowest COGS and highest profit. Weighted average is $3,000 in both cases because it ignores order.
Checking it in code
def cogs_from_layers(layers, units_sold):
remaining = units_sold
cogs = 0
for units, cost in layers:
take = min(units, remaining)
cogs += take * cost
remaining -= take
if remaining == 0:
break
if remaining:
raise ValueError('sold more units than available')
return cogs
rising = [(100, 10), (200, 12), (100, 14)]
falling = list(reversed(rising))
for label, layers in [('rising', rising), ('falling', falling)]:
fifo = cogs_from_layers(layers, 250)
lifo = cogs_from_layers(list(reversed(layers)), 250)
print(label, 'FIFO', fifo, 'LIFO', lifo)
# rising FIFO 2800 LIFO 3200
# falling FIFO 3200 LIFO 2800Common errors
- Assuming LIFO always lowers profit. It does so only when costs are rising. Check the direction of the trend first.
- Mixing up the two statements. COGS and inventory move in opposite directions because they always add to the same total.
- Forgetting that a flat trend removes the differences. If every layer costs the same, all methods agree.
Exercise
Purchases are 100 units at $20, then 100 units at $25, and 120 units are sold. Prices are rising. Which method reports the lower ending inventory, and by how much compared with the other? Compute FIFO and LIFO.
Show answer
Goods available is 100×20 + 100×25 = $4,500. FIFO COGS is 100×20 + 20×25 = $2,500, so ending inventory is $2,000. LIFO COGS is 100×25 + 20×20 = $2,900, so ending inventory is $1,600. LIFO reports the lower ending inventory, by $400.