SOLVETUTORMATH SOLVER

Instrument MI-02-226 · Finance

FIFO Calculator for Inventory

Enter three inventory layers — quantity and unit cost each — and the units sold. The instrument works oldest-first through the layers and prices the sale on what it actually used.

Instrument MI-02-226
Sheet 1 OF 1
Rev A
Verified
Type 02 — Business SER. 2026-02226

Cost of goods sold (FIFO)

$2,200.00

L1 used = min(sold, qty1)

100.0000 Units drawn from layer 1
100.0000 Units drawn from layer 2
0.0000 Units drawn from layer 3
The working Every figure verified twice
  1. fromLayer1 = clamp(200, 0, 100) = 100.0000
  2. fromLayer2 = clamp(200 − 100, 0, 150) = 100.0000
  3. fromLayer3 = clamp(200 − 100 − 100, 0, 200) = 0.0000
  4. cogs = 100·10 + 100·12 + 0·14 = 2,200.00
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

FIFO — first in, first out — is a costing convention that assumes the oldest units purchased are the first ones sold, even when the warehouse floor tells a different story. A controller closing a perpetual inventory system, an auditor testing how a company valued its stock, or a bookkeeper reconciling batches bought at different prices all reach for FIFO layering when unit costs changed between purchases, because it decides which specific purchase price gets charged against a sale rather than blending everything into one average.

This instrument keeps three purchase layers — oldest, middle, and newest — each with its own quantity and unit cost, and drains them in strict age order. A sale first claims units from Layer 1 up to whatever quantity sits there; anything still unsold spills into Layer 2, and only once that layer is exhausted does Layer 3 get touched. Cost of goods sold is the sum of each layer's units multiplied by that layer's own cost, not one blended rate.

The convention has a real limit: it assumes the three layers keep their identity through the period, which holds for a business running perpetual, lot-tracked stock but not for one that only counts inventory periodically and applies FIFO after the fact to a pile of receipts. The common misreading treats FIFO as a claim about which physical units left the shelf — a gravel yard scoops from whichever pile sits closest, regardless of purchase date — when it is really an accounting assignment of cost. In a period of rising purchase prices it charges the oldest, cheapest cost to the sale first, reporting lower expense and higher paper profit than LIFO would show on an identical sale.

L1=min(S, q1)L_1 = \min(S,\ q_1)L2=min(SL1, q2)L_2 = \min(S - L_1,\ q_2)L3=min(SL1L2, q3)L_3 = \min(S - L_1 - L_2,\ q_3)COGS=L1c1+L2c2+L3c3COGS = L_1 c_1 + L_2 c_2 + L_3 c_3
S — units sold · q1, q2, q3 — quantity held in layers 1 (oldest), 2, and 3 (newest) · c1, c2, c3 — unit cost of each layer · L1, L2, L3 — units the sale draws from each layer · COGS — cost of goods sold under FIFO.
  • Enter Layer 1 quantity (oldest) and Layer 1 unit cost, $ — the size and price of the earliest purchase still on hand.
  • Enter Layer 2 quantity and Layer 2 unit cost, $ for the next purchase, then Layer 3 quantity (newest) and Layer 3 unit cost, $ for the most recent one.
  • Enter Units sold — the number of units the sale actually moved this period.
  • Read Units drawn from layer 1, Units drawn from layer 2, and Units drawn from layer 3 to see exactly which purchases were consumed.
  • Read Cost of goods sold (FIFO) — the layer-weighted total the sale is costed at.

Worked example — 200 units sold across three layers

Take a stockroom holding 100 units bought at $10 (Layer 1, the oldest), 150 units at $12 (Layer 2), and 200 units at $14 (Layer 3, the newest). A sale of 200 units first claims the entire 100-unit Layer 1, since that layer is smaller than the sale — it empties completely at $10 each and 100 units of demand still remain.

The remaining 100 units the sale needs come from Layer 2, which has 150 on hand at $12 each, so 50 units of that layer stay untouched and Layer 3 is never reached at all. Cost of goods sold is (100 × $10) + (100 × $12) = $2,200, the figure this instrument returns for exactly these inputs. Selling the identical 200 units under LIFO would instead draw entirely from the newest $14 layer, reporting $2,800 of cost — $600 more than FIFO shows here, purely because the two conventions disagree about which purchase price to charge.

Questions

Why does the calculator work through three separate layers instead of one average cost?

Because FIFO is defined by purchase order, not by a blended rate — it assigns the exact price paid for each still-unconsumed batch. A single weighted-average cost would blur $10, $12, and $14 units into one number and lose which specific purchase the sale is actually charged against, which is the entire point of layer accounting.

What happens if units sold is larger than all three layers combined?

The instrument flags it — units sold cannot exceed the total quantity sitting across Layer 1, Layer 2, and Layer 3, since FIFO can only draw from stock that is actually on hand. A number that large usually means a typo in one of the quantity fields, or inventory that was never entered as a fourth layer.

Why did Layer 3 end up untouched in the worked example?

Because Layers 1 and 2 together held 250 units, more than the 200-unit sale, so FIFO's oldest-first rule never needed to reach the newest batch. Layer 3 only gets drawn on once a sale is large enough to exhaust everything older than it — raise units sold past 250 here and it starts contributing.

How is this different from the plain Cost of Goods Sold calculator on this site?

That instrument sums beginning inventory plus purchases minus ending inventory into one COGS figure without deciding which units those dollars represent. This one models the layers directly, so it shows which specific purchase costs, not just a period total, got charged to the sale — what FIFO as a valuation method actually requires.

Does rising or falling purchase cost change what FIFO reports?

Yes. When costs are rising, as in the layers here ($10, then $12, then $14), FIFO spends the cheapest units first, so it reports lower cost of goods sold and higher paper profit than LIFO would on the same sale. When costs are falling between purchases, that relationship flips and FIFO reports the higher cost instead.

Does FIFO require the oldest physical units to leave the shelf first?

No — it is a costing assumption, not a claim about physical handling. A retailer can pick items from anywhere on the shelf and still keep FIFO books, because the convention only decides which purchase price gets charged to the sale, not which physical box a warehouse worker actually reached for.

References

Read this first: This instrument shows arithmetic, not advice. Real offers add fees, taxes and terms that vary by lender and place — verify the figures against your actual paperwork before deciding anything.