Sub topic 6
LIFO: newest costs go to COGS first
This chapter assumes you know the goods-available-for-sale equation (beginning inventory plus purchases equals COGS plus ending inventory). It also assumes you have seen FIFO worked once.
The idea
Last-in, first-out (LIFO) assumes the most recently purchased units are sold first. The newest costs go to cost of goods sold (COGS). The oldest costs stay in ending inventory.
This is a cost flow assumption, not a claim about the shelf. A company can ship its oldest stock first and still use LIFO for its accounting.
Periodic LIFO, worked
The running example has these layers: 100 units at $10, 200 at $12, and 100 at $14. Goods available for sale are $4,800. The company sells 250 units.
Under a periodic system, you count units at period end and apply LIFO to the whole period at once. Take the newest layers first:
| Layer | Units taken | Cost | Amount |
|---|---|---|---|
| $14 (newest) | 100 | $14 | $1,400 |
| $12 | 150 of 200 | $12 | $1,800 |
| **COGS** | 250 | **$3,200** |
Ending inventory is the remaining 100 units at $10 plus 50 units at $12. That is $1,000 + $600 = $1,600. Check: $3,200 + $1,600 = $4,800.
Perpetual LIFO
Under a perpetual system, you apply LIFO at each sale, using only the layers on hand on that date. The later sale cannot reach back to a layer bought after an earlier sale. This is why perpetual and periodic LIFO can give different answers.
Use the events from the perpetual average example. Start with 100 units at $10. Buy 200 at $12 on day 5 and sell 150 on day 10. Buy 100 at $14 on day 15 and sell 100 on day 20.
# Perpetual LIFO: a stack of [units, unit_cost] layers, newest on top.
stack = [[100, 10]]
cogs = 0
events = [
('buy', 200, 12), # day 5
('sell', 150, None), # day 10
('buy', 100, 14), # day 15
('sell', 100, None), # day 20
]
for kind, qty, unit_cost in events:
if kind == 'buy':
stack.append([qty, unit_cost])
else:
remaining = qty
while remaining:
top = stack[-1]
take = min(top[0], remaining)
cogs += take * top[1]
top[0] -= take
remaining -= take
if top[0] == 0:
stack.pop()
print(cogs, sum(u for u, _ in stack), sum(u * c for u, c in stack))
# 3200 150 1600The day 10 sale takes 150 units at $12 ($1,800). The day 20 sale takes the 100 units at $14 ($1,400). COGS is $3,200 again. The two systems match here only because the day 20 sale exactly consumes the newest layer. With different sale dates they would differ.
Effects when prices rise
With rising prices, LIFO charges the highest costs to COGS. Compared with FIFO ($2,800) and weighted average ($3,000), LIFO gives:
- The highest COGS ($3,200), so the lowest gross profit and taxable income.
- The lowest ending inventory ($1,600), made of the oldest and cheapest costs.
When prices fall, the pattern reverses. LIFO then gives lower COGS and higher income than FIFO.
Common errors
- Starting from the oldest layer in periodic LIFO. Start from the newest.
- Letting a perpetual sale use a layer purchased after the sale date.
- Forgetting that the leftover layers, not the sold ones, make up ending inventory.
LIFO is allowed under US GAAP but prohibited under IFRS. Later chapters cover that rule and the tax conformity requirement.
Exercise
A company starts with 50 units at $20, then buys 50 units at $25. It sells 60 units, using periodic LIFO. What are COGS and ending inventory?
Show answer
LIFO takes the newest costs first: 50 units at $25 = $1,250, plus 10 units at $20 = $200. COGS is $1,450. Ending inventory is 40 units at $20 = $800. Check: goods available $2,250 = $1,450 + $800.