Lesson 6 of 16 · Level 2: Intermediate
Inventory and Cost of Goods Sold: FIFO, LIFO and Weighted Average
- ⏱ 12 min read
- ❓ 4 review questions
- ✍️ Exercise with solution
In this lesson
- The difference between perpetual and periodic inventory systems.
- How to record inventory purchases and sales, including cost of goods sold.
- How to cost inventory with FIFO, LIFO and weighted average, using an inventory card.
- Why LIFO is allowed under U.S. GAAP but not IFRS, and how it affects taxes.
- How to measure inventory turnover and handle shrinkage and write-downs.
If your business buys and sells products, inventory is often its largest asset and the hardest to control. How you value it determines your cost of goods sold, and therefore your gross profit and your taxes. In lesson 2 you saw that buying inventory isn't an expense; it becomes cost of goods sold (COGS) when it's sold. This lesson answers the next question: what did the units you sold actually cost, when you bought the same product at different prices?
Perpetual vs. periodic inventory
Perpetual system
Every purchase and every sale updates inventory as it happens, with its cost. COGS is the sum of the cost of each unit sold.
Used by: almost every business with a point-of-sale system or inventory software (Shopify, Square, QuickBooks).Periodic system
Purchases go into the books, but inventory is only counted at the end of the period. COGS is worked out by difference.
Used by: very small shops without item-level tracking.Periodic COGS = Beginning inventory + Purchases − Ending inventory (counted)
Even with a perpetual system you must count your stock regularly, at least once a year and ideally in rolling cycle counts. The gap between what the system says and what's on the shelf is shrinkage: theft, breakage, spoilage and recording errors.
The entries in a perpetual system
In its second year, Brightside Coffee starts selling 12-ounce bags of its house blend for $20. It buys 200 bags from its roaster at $12 each on account, then sells 50 bags for cash (we leave sales tax out to keep the focus on inventory):
| Transaction | Account | Debit | Credit |
|---|---|---|---|
| Purchase on account | Inventory | $2,400 | |
| Accounts Payable | $2,400 | ||
| Sale of 50 bags | Cash | $1,000 | |
| Sales Revenue | $1,000 | ||
| Cost of Goods Sold | $600 | ||
| Inventory | $600 |
Every sale creates two entries: one for the revenue, at the selling price, and one moving the goods out of inventory, at cost. The difference, $400, is the gross profit on that sale. Your point-of-sale system does this automatically, but only if each product's cost is set up correctly.
The real question: which cost goes out?
Prices change. If you bought bags at $10, then $12, then $13, what did the bags you sold cost? U.S. GAAP allows three main cost-flow assumptions for interchangeable goods:
- FIFO (first in, first out): the oldest units are assumed sold first. Ending inventory reflects recent prices.
- LIFO (last in, first out): the newest units are assumed sold first. Ending inventory reflects old prices.
- Weighted average: each unit sold is valued at the average cost of what's on hand (a moving average in a perpetual system).
The method is an accounting assumption; it doesn't have to match how you physically rotate stock. Brightside obviously sells its freshest beans last, but it could still choose LIFO for its books.
A full example: the inventory card
One month of Brightside's retail bag shelf:
- Beginning inventory: 100 bags at $10 = $1,000
- Purchase: 200 bags at $12 = $2,400
- Sale: 250 bags
- Purchase: 100 bags at $13 = $1,300
- Sale: 120 bags
Goods available for sale: $1,000 + $2,400 + $1,300 = $4,700 (400 bags). Brightside sold 370 bags, so 30 are left.
FIFO
| Movement | Cost of units sold | Balance on hand |
|---|---|---|
| Beginning | 100 × $10 = $1,000 | |
| Buy 200 at $12 | 100 × $10 + 200 × $12 = $3,400 | |
| Sell 250 | 100 × $10 + 150 × $12 = $2,800 | 50 × $12 = $600 |
| Buy 100 at $13 | 50 × $12 + 100 × $13 = $1,900 | |
| Sell 120 | 50 × $12 + 70 × $13 = $1,510 | 30 × $13 = $390 |
COGS: $2,800 + $1,510 = $4,310. Ending inventory: $390.
LIFO (perpetual)
| Movement | Cost of units sold | Balance on hand |
|---|---|---|
| Sell 250 | 200 × $12 + 50 × $10 = $2,900 | 50 × $10 = $500 |
| Buy 100 at $13 | 50 × $10 + 100 × $13 = $1,800 | |
| Sell 120 | 100 × $13 + 20 × $10 = $1,500 | 30 × $10 = $300 |
COGS: $2,900 + $1,500 = $4,400. Ending inventory: $300.
Moving weighted average
| Movement | Calculation | Average cost | Result |
|---|---|---|---|
| Beginning + purchase | $3,400 ÷ 300 bags | $11.333 | 300 bags = $3,400 |
| Sell 250 | 250 × $11.333 | COGS $2,833.33 · 50 bags left = $566.67 | |
| Buy 100 at $13 | ($566.67 + $1,300) ÷ 150 bags | $12.444 | 150 bags = $1,866.67 |
| Sell 120 | 120 × $12.444 | COGS $1,493.33 · 30 bags left = $373.33 |
COGS: $4,326.67. Ending inventory: $373.33.
With every method, COGS + ending inventory = beginning inventory + purchases. FIFO: $4,310 + $390. LIFO: $4,400 + $300. Average: $4,326.67 + $373.33. All equal $4,700. The method doesn't change the total cost; it only changes how it's split between what you sold and what's left.
Here's the ending inventory each method leaves on the balance sheet:
With 370 bags sold at $20 ($7,400 of revenue), gross profit is $3,090 under FIFO, $3,073.33 under weighted average and $3,000 under LIFO. When prices rise, FIFO shows the most profit and LIFO the least. The $90 gap between FIFO and LIFO inventory is called the LIFO reserve; companies that use LIFO disclose it so readers can compare them with FIFO companies.
- Profit when prices rise
- ●●●●
- Balance sheet realism
- ●●●●
- Ideal if
- You want simple, intuitive numbers and plan to report under IFRS someday.
- Profit when prices rise
- ●●●●
- Balance sheet realism
- ●●●●
- Ideal if
- Your costs rise steadily and lowering taxable income matters more than reported profit.
- Profit when prices rise
- ●●●●
- Balance sheet realism
- ●●●●
- Ideal if
- You buy commodities whose prices move up and down, like coffee, fuel or grain.
LIFO: a U.S. specialty with a tax angle
LIFO is permitted under U.S. GAAP but prohibited under IFRS, the standards used in most other countries. Its appeal is taxes: when costs rise, LIFO puts the newest, highest costs into COGS, which lowers taxable income. There's a catch known as the LIFO conformity rule: if you use LIFO on your tax return, you must also use it in the financial statements you give to owners and lenders. Electing LIFO for taxes is done with IRS Form 970, and switching methods later generally requires IRS consent. Whatever you choose, apply it consistently.
1. When purchase prices are rising, how does FIFO's cost of goods sold compare with weighted average?
FIFO assigns the oldest costs to the units sold. With rising prices those are the cheapest, so COGS is lower and profit is higher. Ending inventory is valued at recent prices.
2. A hardware store uses a periodic system. Beginning inventory is $20,000, purchases are $80,000 and the year-end count is $15,000. What is COGS?
$20,000 + $80,000 − $15,000 = $85,000.
Inventory turnover: is it selling or sitting?
Inventory turnover = COGS ÷ Average inventory
Days in inventory = 365 ÷ Turnover (or 30 ÷ Turnover for a monthly figure)
In the example, average inventory for the month is ($1,000 + $390) ÷ 2 = $695, and monthly FIFO turnover is $4,310 ÷ $695 ≈ 6.2 times: a bag sits on the shelf about 5 days. That's excellent for fresh coffee. A furniture store or a hardware store would normally turn much more slowly. Compare yourself with your own history and with your industry.
Slow-moving inventory ties up cash, risks becoming obsolete and costs money to store and insure. Review items that haven't sold in months: discount them, stop reordering them or negotiate returns with the supplier.
If goods are damaged, obsolete or can only be sold below cost, GAAP requires a write-down. For FIFO and average cost, inventory is carried at the lower of cost and net realizable value (expected selling price minus the costs to sell); LIFO users apply a "lower of cost or market" test. The loss is recorded as an expense, usually within COGS. Unlike IFRS, U.S. GAAP doesn't let you reverse the write-down if prices recover. It's the conservatism principle from lesson 1, applied to the stockroom.
3. Your count finds 20 fewer bags than the system shows, at a cost of $12 each. What entry do you make?
The books must come down to what's really on the shelf, and the loss is an expense: shrinkage, usually reported within COGS.
4. Which statement about LIFO is true?
LIFO is a U.S. GAAP option that IFRS prohibits, and the LIFO conformity rule ties your book method to your tax method.
Practice exercise
An outdoor gear shop in Boise, Idaho, starts the month with 40 backpacks at $25. It buys 60 at $30, sells 70, buys 50 at $32 and sells 45.
- Calculate COGS and ending inventory with FIFO.
- Calculate them with perpetual LIFO.
- Calculate them with the moving weighted average.
- Check that each method adds up to the same total.
See solution
Goods available = 40×$25 + 60×$30 + 50×$32 = $1,000 + $1,800 + $1,600 = $4,400
FIFO
Sell 70: 40×$25 + 30×$30 = $1,900 left 30×$30
Sell 45: 30×$30 + 15×$32 = $1,380 left 35×$32 = $1,120
COGS $3,280 · Ending inventory $1,120 · Total $4,400
LIFO (perpetual)
Sell 70: 60×$30 + 10×$25 = $2,050 left 30×$25
Sell 45: 45×$32 = $1,440 left 30×$25 + 5×$32 = $910
COGS $3,490 · Ending inventory $910 · Total $4,400
Moving weighted average
After 1st purchase: $2,800 ÷ 100 = $28.00
Sell 70: 70×$28.00 = $1,960 left 30 units = $840
After 2nd purchase: ($840 + $1,600) ÷ 80 = $30.50
Sell 45: 45×$30.50 = $1,372.50 left 35 units = $1,067.50
COGS $3,332.50 · Ending inventory $1,067.50 · Total $4,400
Prices rose, so LIFO gives the highest COGS ($3,490) and FIFO the lowest ($3,280), with the average in between.
Summary
- In a perpetual system, every sale has two entries: revenue at selling price and COGS at cost.
- FIFO expenses the oldest costs, LIFO the newest, and weighted average the mean cost on hand.
- COGS + ending inventory = beginning inventory + purchases, whatever the method.
- LIFO is a U.S. GAAP option that lowers taxable income when costs rise, but the conformity rule requires using it in your books too.
- Track turnover, count your stock and write down inventory worth less than its cost.
Next lesson: Adjusting Entries and Closing the Books. You'll record prepaid and accrued items, estimate bad debts and close Brightside's month the way a bookkeeper does.
Create your account in 30 seconds, mark your lessons and download your certificate at the end.