What FIFO Means for Inventory Costing
FIFO, first-in first-out, is a cost flow assumption: the dollar costs of your oldest purchases move to cost of goods sold first, and the newest purchase costs stay on the balance sheet as ending inventory. The goods themselves may or may not rotate that way on the shelf. What FIFO controls is which costs the income statement absorbs, which is why two identical stores can report different profits while selling the same products at the same prices.
The distinction matters because inventory is usually the largest current asset on a product company's balance sheet. When you buy the same item at $10, then at $12, then at $14, those purchases form separate cost layers. FIFO peels cost off the bottom of the stack (the $10 layer first), LIFO peels off the top, and weighted average blends the whole stack into one unit cost. None of them changes what you paid in total, only the split between what was sold and what remains.
This calculator works directly on those layers. Enter each purchase with its quantity and unit cost, enter the units sold, and the tool consumes the layers in the order your chosen method dictates. It complements the ending inventory calculator, which closes the balance sheet from beginning inventory and net purchases, and the COGS calculator, which works from the total cost side when you do not track layers.
How Layer Consumption Works Step by Step
Run the default numbers to see the mechanics. You own three layers: 100 units at $10.00, 100 at $12.00, and 100 at $14.00, so 300 units costing $3,600 in total. You sell 150 units. FIFO takes all 100 units from the $10 layer, which contributes $1,000 of COGS, then takes the remaining 50 units from the $12 layer, contributing $600. Total FIFO COGS is $1,600 for the period.
Ending inventory is simply the cost left unconsumed: 50 units from the $12 layer ($600) plus the untouched 100 units at $14 ($1,400), which is $2,000. The built-in check is that COGS plus ending inventory must equal the cost of goods available for sale: $1,600 + $2,000 = $3,600 exactly. If that identity ever fails in your own workpapers, a layer was dropped or double-counted.
Layer 4 exists for restock cycles that cross four purchases, and leaving it at zero simply removes it from the calculation. Order matters: layers are consumed oldest first, so a layer keyed in out of purchase-date sequence misstates both outputs. Units sold above total availability are capped, since a warehouse cannot hold negative stock, and any cap you hit in real books points to an unrecorded purchase or a bad count.
FIFO vs LIFO vs Weighted Average on the Same Layers
The three methods give three answers from identical inputs. On the default layers, FIFO charges $1,600, weighted average charges $1,800 (an average unit cost of $12.00 applied to 150 units), and LIFO charges $2,000. The $400 FIFO-LIFO gap equals the 100 units whose cost differs by $4 between the oldest and newest layers, which is how the spread always decomposes: units crossed times the cost steps they cross.
Expressed as a ratio, LIFO COGS runs 25% higher than FIFO here, and that ratio widens as price growth steepens. The balance sheet moves the opposite way: FIFO ending inventory of $2,000 contains the newest $12 and $14 costs, close to what restocking actually costs today, while LIFO's $1,600 ending inventory carries the stale $10 layer. Analysts reading a LIFO balance sheet adjust for this gap, called the LIFO reserve, before comparing companies.
Direction flips with prices. Enter the layers in falling order (100 at $14, 100 at $12, 100 at $10) and FIFO now charges $2,000 while LIFO charges $1,600, because the expensive old stock hits the income statement first. Weighted average still lands at $1,800 either way. For tracking how price levels move the gap over time, the inflation calculator gives the broader rate context that drives layer cost spreads.
Tax and Reporting Effects of FIFO
Method choice moves taxable income whenever prices are not flat. Selling 150 units at $20.00 generates $3,000 of revenue, so gross profit is $1,400 under FIFO and $1,000 under LIFO on identical transactions. At a 25% tax rate that is $350 of tax versus $250, a $100 difference per period. LIFO defers tax in inflationary times by reporting less profit now; FIFO pays the higher tax but reports the stronger earnings figure.
In the US, LIFO comes with the conformity rule of IRC Section 472: use it on the tax return and your financial books must use it too, no presenting FIFO statements with a LIFO return. IFRS removes the option entirely, banning LIFO since old-cost balance sheets stop representing economic reality. Multinationals that report under IFRS therefore run FIFO even where US subsidiaries keep LIFO for tax, reconciling the difference through disclosure.
Consistency is the third constraint. Switching methods is treated as an accounting change requiring justification and, for tax, IRS consent, because restated COGS breaks year-over-year comparability. When projecting how the choice flows through to bottom-line figures, the accounting profit calculator shows how a $400 COGS shift lands after operating costs.
Profit Margins, Replacement Cost, and Pricing
On the default example, gross margin is 46.7% under FIFO, 40.0% under weighted average, and 33.3% under LIFO, all from the same sales. Nothing about the business changed between those three numbers, only the assumption about which costs the sales absorbed. Anyone benchmarking margins across companies should check the inventory note first, since a FIFO retailer and a LIFO competitor can look 10 percentage points apart while operating identically.
FIFO's profit carries a hidden holding gain. Replacing the 150 units you sold costs $2,100 at the current $14.00 price, but FIFO charged only $1,600 of COGS, so $500 of the reported gross profit exists only because old stock was cheaper. That profit is real cash today and gone tomorrow: keep pricing off FIFO COGS and the spread collapses the next time you restock at higher cost.
LIFO approximates current-cost matching, charging revenue with near-replacement costs, which is why it prices conservatively in growth markets. For setting prices on what stock will cost next month rather than what it cost last quarter, pair the layer results with the markup calculator so margin targets sit on replacement cost, not on the cheapest old layer.
Downstream Inventory Metrics That Rely on COGS
COGS feeds the efficiency ratios lenders and analysts watch. The default FIFO close leaves $2,000 of ending inventory against $1,600 of monthly COGS, or $53.33 of cost per day, which is 37.5 days of stock on hand. Divide average inventory by daily COGS across the year and you have the days inventory outstanding calculator metric in its standard form.
Inventory days is also the first leg of the cash conversion cycle calculator: days inventory plus days sales outstanding minus days payable. A method choice that inflates ending inventory stretches measured DIO even though nothing operational changed, one more reason to state the assumption alongside the ratio. Ordering decisions then belong to the EOQ calculator, which sizes purchase batches from demand and holding cost rather than from accounting layers.
Timing the next purchase while stock runs down is a reorder-point question driven by sales velocity and supplier delay, handled with the lead time calculator. Keep the operational numbers separate from the costing assumption: order quantities respond to real consumption, while layers only revalue what the consumption is deemed to cost.
Perpetual vs Periodic Systems and Common Mistakes
Under FIFO, perpetual and periodic systems usually agree. A perpetual book consumes the oldest remaining layers at each sale date, and a periodic close applies the oldest costs to total units sold at period end; with clean records both land on $1,600 for the default example. Divergence needs a timing quirk, such as shrinkage counted mid-period or a sale booked before its receiving, and even then FIFO converges faster than LIFO would.
The classic mistakes are data mistakes. Freight-in left out of unit cost understates layers: the $100 delivery on a $1,000 purchase makes it a $1,100 layer at $11.00 per unit, and omitting it quietly shifts cost out of COGS. Customer returns restocked at today's price instead of their original layer cost corrupt the stack, and a layer keyed out of date order poisons both outputs at once.
Shrinkage, theft, and damage need deliberate treatment: consume them at FIFO cost like extra sales, or write them off explicitly, but never net them against the newest purchase. Reconcile the layer table to physical counts quarterly. If counted stock is less than the layers show, the missing units come off at the cost FIFO assigns them, which keeps the identity, COGS plus ending inventory equals goods available, intact.
Worked Audit-Trail Example and Sensitivity Checks
Take a steeper cost curve: 200 units at $25, another 200 at $27, and 200 at $30, with 400 units sold. FIFO charges $10,400 (all of the $25 layer plus all of the $27 layer), LIFO charges $11,400, and weighted average charges $10,933.33 at a blended $27.33 unit cost. LIFO runs 9.6% above FIFO here, and the $1,000 gap equals the 200 units spanning the full $5 spread between oldest and newest costs.
Ending inventory tells the same story in reverse: FIFO leaves $6,000 of $30 stock, LIFO leaves $5,000 of $25 stock, weighted average $5,466.67. Sell out the entire 600 units and every method reports the same $16,400 of total COGS with the gap at zero. The method never changes what inventory cost in total; it only moves cost between periods, which is exactly what the timing-of-tax argument is about.
Because COGS sits inside operating results, the $400 method spread reaches the operating line directly, a flow-through you can trace with the EBITDA calculator. Use the explanation line as the audit trail: it states available units and cost, all three COGS figures, ending inventory, and the FIFO-LIFO gap in one copyable sentence, ready to paste into workpapers or a month-end memo.