What is FIFO inventory accounting?
First-In, First-Out (FIFO) is an inventory cost-flow assumption that assigns the cost of the oldest purchased units to Cost of Goods Sold (COGS) first, while the most recently acquired units remain in ending inventory. It is one of the two most widely accepted methods under both U.S. GAAP and IFRS (the other being weighted-average cost; LIFO is permitted only under U.S. GAAP).
Enter your inventory batches (oldest to newest) and the number of units sold. The calculator consumes each batch in order, computes COGS from the cheapest historical costs, and values ending inventory at the most recent prices. All math runs in your browser. To find the dollar value of stock on hand at period end without specifying individual batches, use the ending inventory calculator. For efficiency metrics such as inventory turnover and days sales of inventory, check the days inventory outstanding calculator.
FIFO formulas
FIFO does not use a single equation; it works by tracking unit layers. The governing identity is:
Where batches are ordered from oldest (i = 1) to newest, and k is the last batch touched to fulfill units sold. Then:
Total cost available is the sum of beginning inventory cost plus all purchase costs for the period:
Worked example
A retailer carries two inventory batches and sells 120 units:
| Batch | Units | Unit cost | Units sold (FIFO) | COGS contribution |
|---|---|---|---|---|
| Batch 1 (oldest) | 100 | $2.00 | 100 | $200.00 |
| Batch 2 (newest) | 50 | $3.00 | 20 | $60.00 |
| Total | 150 | 120 | $260.00 COGS |
Ending inventory: 30 units remaining from Batch 2 at $3.00 each = $90.00. Total cost available was $350.00, and $350.00 − $260.00 = $90.00 confirms the result.
FIFO vs. other inventory methods
The method chosen affects reported gross profit, taxable income, and balance-sheet inventory value, particularly when purchase prices change over time.
| Method | COGS in rising-price market | Ending inventory in rising-price market |
|---|---|---|
| FIFO | Lower (oldest, cheaper costs) | Higher (recent prices) |
| LIFO (U.S. GAAP only) | Higher (newest, pricier costs) | Lower (older prices) |
| Weighted average | Between FIFO and LIFO | Between FIFO and LIFO |
Because FIFO reports higher gross profit during inflationary periods, it also produces a higher tax liability for many businesses. LIFO is banned under IFRS. Weighted-average cost smooths price fluctuations and is common in industries with interchangeable commodity stock.
When to use FIFO
- Perishable goods — food, pharmaceuticals, and cosmetics naturally sell oldest stock first; FIFO mirrors physical flow.
- IFRS-reporting businesses — LIFO is not permitted, making FIFO or weighted-average the only options.
- Rising-price environments — FIFO maximises reported gross profit and balance-sheet inventory value, which can improve loan covenants and creditworthiness.
- Investor-facing reporting — ending inventory at current market prices is easier for analysts to interpret.
Frequently asked questions
Does FIFO always minimize COGS?
Can I use more than three inventory batches?
Why does this tool cap units sold at total available?
Is FIFO the same as the periodic and perpetual inventory systems?
Does FIFO affect taxes?
How is ending inventory valued under FIFO?
Which currency does this calculator use?
Resources and references
The formulas and methods in this calculator were checked against these independent sources.