FIFO Inventory Calculator
Compute the cost of goods sold (COGS) under the first-in, first-out (FIFO) method from old and new cost layers and the units sold.
Input Data
Results
At a glance:FIFO (First-In, First-Out) is an inventory-costing assumption that the earliest purchased units are sold first. For COGS, it consumes the older (first-in) layer's unit cost first, then the newer (next-in) layer once the old layer is exhausted. In a rising-price environment, FIFO gives lower COGS, higher ending inventory and higher book profit.
Formula
Consume the old layer (first-in) first; use the new layer only when sold units exceed the old layer.
COGS = old-layer units used × old unit cost + new-layer units used × new unit cost.
$$\text{COGS} = Q_{\text{old}} \times C_{\text{old}} + Q_{\text{new}} \times C_{\text{new}}$$How to Use
- Enter the earlier-purchased old-layer quantity and unit cost.
- Enter the later-purchased new-layer quantity and unit cost.
- Enter the units sold and view the FIFO cost of goods sold.
FIFO cost of goods sold examples
| Units sold | Old layer used (@HK$50) | New layer used (@HK$60) | COGS |
|---|---|---|---|
| 100 | 100 | 0 | HK$5,000.00 |
| 150 | 100 | 50 | HK$8,000.00 |
| 200 | 100 | 100 | HK$11,000.00 |
Old layer 100 @HK$50, new layer 100 @HK$60. FIFO exhausts the old layer first, then the new; the more sold, the more of the dearer new layer is used, so COGS rises.
Case Studies
Case 1: FIFO cost of goods sold
Shop: old layer 100 units @ HK$50, new layer 100 units @ HK$60, sold 150 in the period.
FIFO: exhaust 100 old = 100×50 = HK$5,000; need 50 more, use new = 50×60 = HK$3,000. COGS = 5,000 + 3,000 = HK$8,000.
Ending inventory is 50 new units (50×60 = HK$3,000). FIFO charges the earlier, cheaper cost to COGS first, leaving the newer, dearer batch in stock — exactly why ending inventory is high in inflation.
Case 2: FIFO's effect on profit and tax in inflation
Compare sales volumes: 100 sold → COGS HK$5,000 (all old); 200 sold → COGS HK$11,000 (100×50 + 100×60). More sold, more new layer, COGS rises.
In inflation, FIFO's lower COGS means higher book profit and possibly higher tax (paper profit, real tax); part of profit is holding gain, not efficiency.
Notes: HKFRS (IFRS) forbids LIFO, so firms choose FIFO or weighted average; perishables suit FIFO; costing method must be consistent and disclosed. Educational only.
FAQ
Why use first-in, first-out rather than any batch's cost?
FIFO is a cost-flow assumption that decides which batch's cost is charged to COGS and which remains in ending inventory. It assumes the earliest purchases are sold first — also matching physical flow for perishables (sell old stock first). Without a consistent rule, you could not objectively assign cost to sold vs remaining units. FIFO gives a clear, consistent, intuitive rule: first-in leaves first, later-in stays in stock, so ending inventory reflects more recent costs (closer to current market) while COGS reflects earlier costs.
How does FIFO affect profit and inventory when prices rise?
In inflation, FIFO charges the cheaper, earlier costs to COGS first, so COGS is low, gross profit and book profit are high, and ending inventory (newer, dearer batches) is valued higher, closer to market. Two cautions: higher book profit may mean higher tax (paper profit, real tax); and part of that 'profit' is holding gain, not operating efficiency. Weighted average smooths costs and reduces profit swings. Choose and disclose a method consistently.
Can Hong Kong use LIFO, and how to choose vs weighted average?
Under HKFRS (aligned with IFRS), LIFO is not allowed for inventory. Hong Kong firms effectively choose between FIFO and weighted average. FIFO suits batched, dated goods (food, medicine); weighted average suits homogeneous bulk materials hard to track by batch. Apply one consistently and disclose it.
How much do FIFO and weighted average differ?
If purchase prices are stable, the two methods give near-identical COGS and ending inventory. With volatile prices, the gap is clear: in rising prices FIFO's COGS is lower (older cheap costs charged first) so book profit and ending inventory are higher. Consistency and disclosure matter most.
Does FIFO mean the warehouse really moves old stock first?
Not necessarily. FIFO is an accounting cost-flow assumption, not a physical-handling mandate. A bulk-gravel seller may scoop from the top (physically last-in-first-out) yet still use FIFO on the books — the two are independent. FIFO governs how costs flow in the accounts; physical logistics is a separate matter. For perishables, physical flow often matches FIFO, but even when it does not, a firm may adopt FIFO as its costing assumption because it is clear and IFRS-compliant.
Related Tools
References
Content review: Calculatorism Finance Team. Results are for reference only; please refer to the relevant authorities for the official figures.