Inventory cost-flow questions show up on every intro and intermediate accounting exam, usually as a table of purchases and sales with the instruction "compute ending inventory and cost of goods sold under FIFO, LIFO and weighted average." There are really six answers to learn, because each method can be run periodically or perpetually. This post works all six on one data set, then gives you a problem to try on your own.
LIFO is allowed under US GAAP but prohibited under IFRS. Our IFRS vs US GAAP comparison explains why. If you study IFRS, the FIFO and average sections below still apply in full.
The Data: Ridgeway Hardware, January
| Date | Event | Units | Unit cost | Total |
|---|---|---|---|---|
| Jan 1 | Beginning inventory | 100 | $10 | $1,000 |
| Jan 8 | Purchase | 200 | $12 | $2,400 |
| Jan 15 | Sale | (220) | ||
| Jan 22 | Purchase | 150 | $14 | $2,100 |
| Jan 28 | Sale | (130) |
Goods available for sale: 450 units costing $5,500. Units sold: 350. Units left: 100. Every method below splits the same $5,500 between cost of goods sold and ending inventory. Only the split changes, and that gives you a built-in check: COGS + ending inventory must always equal $5,500.
Periodic: One Calculation at Month-End
Under periodic, ignore the sale dates. Treat all 350 units as sold at the end of the month, out of the full pool of 450.
FIFO (first in, first out): the oldest units are sold first, so the 100 left are the newest.
Ending inventory = 100 Γ $14 = $1,400. COGS = 5,500 β 1,400 = $4,100.
LIFO (last in, first out): the newest units are sold first, so the 100 left are the oldest.
Ending inventory = 100 Γ $10 = $1,000. COGS = 5,500 β 1,000 = $4,500.
Weighted average: one average for the whole month.
Average cost = $5,500 Γ· 450 = $12.2222 per unit.
Ending inventory = 100 Γ 12.2222 = $1,222. COGS = $4,278.
Perpetual: Work Through the Dates in Order
Under perpetual, each sale draws only from the units on hand on the day of the sale. Units purchased later do not exist yet.
FIFO perpetual
Jan 15 sells 220: 100 @ $10 + 120 @ $12 = $2,440. Left: 80 @ $12.
Jan 28 sells 130: 80 @ $12 + 50 @ $14 = $1,660. Left: 100 @ $14.
COGS = $4,100. Ending inventory = $1,400.
That is identical to FIFO periodic, and it always will be. The oldest units are the oldest whether you look daily or monthly. Spotting this saves time in an exam.
LIFO perpetual
Jan 15 sells 220: the newest units available that day are the Jan 8 batch, so 200 @ $12 + 20 @ $10 = $2,600. Left: 80 @ $10.
Jan 28 sells 130: the newest are now the Jan 22 units, 130 @ $14 = $1,820. Left: 80 @ $10 + 20 @ $14.
COGS = $4,420. Ending inventory = 800 + 280 = $1,080.
This differs from LIFO periodic ($4,500), because on Jan 15 the $14 units had not arrived and could not be "sold".
Moving average (perpetual)
Recompute the average after every purchase:
After Jan 8: 300 units, $3,400 β $11.3333 per unit.
Jan 15 sells 220 Γ $11.3333 = $2,493.33. Left: 80 units, $906.67.
After Jan 22: 230 units, $906.67 + $2,100 = $3,006.67 β $13.0725 per unit.
Jan 28 sells 130 Γ $13.0725 = $1,699.42. Left: 100 units, $1,307.25.
COGS = 2,493.33 + 1,699.42 = $4,192.75.
All Six Answers Together
| Method | COGS | Ending inventory |
|---|---|---|
| FIFO (periodic or perpetual) | $4,100 | $1,400 |
| Moving average (perpetual) | $4,192.75 | $1,307.25 |
| Weighted average (periodic) | $4,278 | $1,222 |
| LIFO (perpetual) | $4,420 | $1,080 |
| LIFO (periodic) | $4,500 | $1,000 |
With prices rising ($10 β $12 β $14), FIFO gives the lowest COGS and highest profit, and LIFO the highest COGS and lowest profit. Average methods land in between. If prices fall, the order reverses. That is the theory question that usually follows the calculation.
Two US GAAP Points That Follow From LIFO
The LIFO reserve. Companies that use LIFO disclose how much higher inventory would be under FIFO. Here (periodic) it is $1,400 β $1,000 = $400. Analysts add it back to compare a LIFO company with a FIFO company.
The LIFO conformity rule. A US company that uses LIFO for its tax return must also use it in its financial statements. In a period of rising prices, LIFO lowers taxable income, which is the main reason companies choose it.
For the year-end write-down, US GAAP applies lower of cost and net realizable value under FIFO and average cost, but keeps the older lower of cost or market test for LIFO and the retail method. The NRV mechanics are the same as in our IAS 2 inventories guide.
Common inventory costing mistakes
- Running LIFO perpetual as if it were periodic. On the sale date, only the units already purchased are available.
- Rounding the average cost too early. Carry four decimals in the unit cost and round only the final dollar figures, or COGS + ending inventory will not add back to the total.
- Skipping the total check. If COGS + ending inventory is not equal to goods available for sale, there is an error somewhere. Find it before you move on.
- Using selling prices. Cost-flow methods use cost. Sales price matters only for revenue and gross profit.
- Forgetting beginning inventory in goods available for sale. It is the first layer in every method.
Try It Yourself
Beginning inventory 50 units @ $20; purchase 100 @ $22; purchase 50 @ $25; 120 units sold. Using the periodic system, find COGS and ending inventory under FIFO, LIFO and weighted average.
Answers: Goods available = $4,450. FIFO: COGS $2,540, ending inventory $1,910. LIFO: COGS $2,790, ending inventory $1,660. Weighted average ($22.25 per unit): COGS $2,670, ending inventory $1,780.
The journal entries that put these costs into the ledger (purchases, returns, discounts and the COGS entry on each sale) are in our perpetual vs periodic merchandising guide. For more practice, try Accountely's inventory valuation challenges, which grade each figure and show where your layers went wrong.
Frequently Asked Questions
What is the difference between FIFO, LIFO and weighted average?
FIFO assumes the oldest units are sold first, LIFO assumes the newest units are sold first, and weighted average gives every unit the same average cost. They split the same total cost of goods available for sale differently between cost of goods sold and ending inventory.
Why do LIFO periodic and LIFO perpetual give different answers?
Periodic LIFO takes the latest purchases of the whole period, including ones made after a sale. Perpetual LIFO can only use units already bought on the date of each sale, so the layers assigned to each sale differ.
Which method gives the highest profit when prices are rising?
FIFO, because the cheaper older units go to cost of goods sold. LIFO gives the lowest profit and the lowest taxable income, which is why US companies use it. IFRS does not allow LIFO.
How can I check my inventory calculation?
Cost of goods sold plus ending inventory must equal cost of goods available for sale under every method. If they do not add back to the total, there is an error.