FIFO Calculator for Inventory
Calculate FIFO COGS and ending inventory from layers and quantity sold. First-in, first-out allocation.
Use the FIFO Calculator for Inventory
Add inventory layers (quantity and unit cost) in chronological order, then enter quantity sold. FIFO COGS and ending inventory are calculated.
Inventory layers (FIFO: oldest first)
Add rows: quantity purchased and unit cost. Order = oldest first. Then enter quantity sold.
Results
| Layer | Qty used | Unit cost | COGS | Qty left |
|---|---|---|---|---|
| 1 | 100 | $10 | $1,000 | 0 |
| 2 | 100 | $12 | $1,200 | 50 |
| 3 | 0 | $11 | $0 | 80 |
FIFO allocates sold quantity to oldest layers first. COGS = sum of (allocated qty × layer unit cost).
What this metric means
FIFO values cost of goods sold using the cost of the earliest purchases first. Ending inventory is valued at the cost of the most recent purchases remaining.
How to calculate it
Order layers from oldest to newest. Allocate quantity sold to the first layer until it's exhausted, then the next, and so on. COGS = Σ(allocated qty × layer unit cost).
How to improve the metric
FIFO is a reporting method, not a lever. To improve margins, focus on buying cost, mix, and pricing rather than changing the costing method.
Common mistakes
Layers in wrong order (newest first); including negative quantities; or using selling price instead of cost in layers. Keep units and currency consistent.
How to interpret your result
Use COGS for P&L and ending inventory for the balance sheet. Compare to other methods (e.g. LIFO, average) if you're evaluating reporting choices.
FAQs
What is FIFO?▾
How do I set up layers?▾
What's ending inventory?▾
FIFO vs LIFO?▾
Related tools
Browse all calculators on NetGrow.