FIFO vs LIFO: inventory methods explained with a simple example

FIFO vs LIFO vs weighted average explained with one worked example: how each method changes cost of goods sold, ending inventory and profit.

Illustration of warehouse shelves, a balance scale and coins

You bought the same product three times this year, at three different prices. Now you have sold some of it. What did the units you sold cost you?

The answer depends on the method you use to value your stock. The two best-known are FIFO and LIFO. They can give noticeably different profit figures from exactly the same sales. This guide explains both, plus the weighted average method, with one example you can follow with a calculator.

What FIFO and LIFO mean

Method Stands for The idea
FIFO First in, first out The oldest units you bought are counted as sold first
LIFO Last in, first out The newest units you bought are counted as sold first
Weighted average Average cost Every unit is counted at the average price you paid

These are accounting methods. They decide which purchase price is matched with each sale. They do not have to describe which physical box leaves the shelf, although FIFO usually matches how a well-run stockroom works.

Two numbers come out of the calculation:

  • Cost of goods sold (COGS): what the units you sold cost you.
  • Ending inventory: the value of the units still on your shelves.

One example, three methods

A shop buys the same candle three times as the supplier raises prices.

Purchase Units Cost per unit Total
January 100 $10 $1,000
March 100 $12 $1,200
June 100 $14 $1,400
Total 300 $3,600

During the year the shop sells 180 candles at $25 each, for $4,500 in revenue. 120 candles remain.

FIFO: the oldest units are sold first

The 180 units sold are the 100 from January and 80 from March.

  • COGS: (100 × $10) + (80 × $12) = $1,000 + $960 = $1,960
  • Ending inventory: (20 × $12) + (100 × $14) = $240 + $1,400 = $1,640
  • Gross profit: $4,500 − $1,960 = $2,540

LIFO: the newest units are sold first

The 180 units sold are the 100 from June and 80 from March.

  • COGS: (100 × $14) + (80 × $12) = $1,400 + $960 = $2,360
  • Ending inventory: (20 × $12) + (100 × $10) = $240 + $1,000 = $1,240
  • Gross profit: $4,500 − $2,360 = $2,140

Weighted average: every unit costs the same

The average cost is $3,600 ÷ 300 = $12 per unit.

  • COGS: 180 × $12 = $2,160
  • Ending inventory: 120 × $12 = $1,440
  • Gross profit: $4,500 − $2,160 = $2,340

The three results side by side

FIFO Weighted average LIFO
Cost of goods sold $1,960 $2,160 $2,360
Ending inventory $1,640 $1,440 $1,240
Gross profit $2,540 $2,340 $2,140

Same purchases, same sales, and a $400 gap in profit between FIFO and LIFO. In every case, COGS plus ending inventory equals the $3,600 spent. The method only changes how that total is split.

What changes when prices rise or fall

In the example, prices were rising. That is the usual situation, and it gives this pattern:

When your costs are rising FIFO LIFO
Cost of goods sold Lower Higher
Reported profit Higher Lower
Taxable income Higher Lower
Ending inventory value Higher, close to current prices Lower, based on old prices

When costs are falling, everything flips: FIFO gives the higher COGS and the lower profit. When costs are stable, the methods give almost the same result.

Where each method is allowed

  • FIFO and weighted average are accepted almost everywhere, under both US accounting rules (GAAP) and international rules (IFRS).
  • LIFO is allowed under US GAAP but not under IFRS. In practice it is mostly an American method. Businesses in Canada, the United Kingdom, the European Union, Australia and most other countries cannot use it for their accounts.
  • In the United States, a business that uses LIFO for tax generally has to use it in its financial statements too, and switching methods later needs approval from the tax authority.

Rules differ by country and change over time. Treat this as general information and confirm the choice with your accountant before you file anything.

Which method should a small business use?

For most small businesses, the practical answer is FIFO or weighted average.

Choose FIFO if:

  • you sell anything that expires, ages or goes out of style, such as food, cosmetics or fashion;
  • you want the stock value on your books to stay close to current prices;
  • you want the simplest method to explain to a lender or a buyer.

Choose weighted average if:

  • your units are identical and mixed together, such as screws, beads or bulk goods;
  • your purchase prices move up and down often and you want smoother margins;
  • your inventory software uses it by default, which many do.

Consider LIFO only if:

  • you are in the United States, your costs rise steadily, you hold a lot of stock, and your accountant recommends it. It adds record-keeping work and is hard to undo.

Whichever you choose, use it consistently. Changing method from year to year makes your figures impossible to compare and can cause trouble at tax time.

FIFO on the shelf: stock rotation

FIFO is also a physical habit, separate from the accounting. It means the oldest stock is picked first so nothing sits at the back until it expires or looks tired.

  • Put new deliveries behind older stock, or load shelves from the back.
  • Write the receiving date on each case.
  • For products with expiry dates, pick by earliest expiry first. This variant is called FEFO (first expired, first out).
  • Check the oldest dates when you do a stock count.

You can rotate stock by FIFO on the shelf and still use weighted average in your books. The two are independent.

How it connects to your other numbers

  • Margins. The method changes COGS, so it changes your gross margin on paper. Compare periods using the same method.
  • Inventory turnover. Turnover is COGS divided by average inventory, so FIFO and LIFO give different ratios from the same sales. See our guide to the inventory turnover ratio.
  • Spreadsheets. FIFO needs one line per purchase batch, with its date, quantity and unit cost. A simple inventory spreadsheet can handle weighted average easily, but FIFO layers get tedious by hand.
  • Software. Inventory and accounting software calculates the cost method for you. Check which methods a tool supports before you commit: our list of the best free inventory software is a starting point.

Common questions

Is FIFO or LIFO better during inflation?

LIFO reports a lower profit when costs rise, which means lower taxable income where it is allowed. FIFO reports a higher profit and a stock value closer to today’s prices. “Better” depends on whether you care more about the tax bill or about how the accounts look to a lender or buyer.

Does FIFO or LIFO give higher net income?

When costs are rising, FIFO gives the higher income because it matches older, cheaper purchases with today’s sales. When costs are falling, LIFO does.

Does the method change how much cash I have?

Not directly. You paid the same suppliers the same amounts. The method changes reported profit, and through it the tax you owe, which is where a cash effect can appear.

What is the difference between FIFO and FEFO?

FIFO picks the stock that arrived first. FEFO picks the stock that expires first. They usually agree, but not when a later delivery has a shorter expiry date.

Key takeaways

  • FIFO counts the oldest purchases as sold first. LIFO counts the newest. Weighted average uses one average cost.
  • With rising costs, FIFO shows lower COGS and higher profit, and LIFO shows the opposite.
  • LIFO is not permitted under IFRS, so it is mostly used in the United States.
  • Most small businesses are well served by FIFO or weighted average.
  • Pick one method, apply it every year, and confirm the choice with your accountant.

← More inventory guides