FIFO (first in, first out) values inventory by expensing the oldest purchase costs first. When you sell, cost of goods sold is drawn from your earliest lots in the order you bought them, and whatever is left, your ending inventory, is carried at the most recent purchase costs. Enter your purchase lots and sales in the calculator below to see COGS and ending inventory layer by layer, and read the full FIFO concept guide for the wider background.
A free tool to see how cost of goods sold and ending inventory break down when you cost your stock oldest-first.
If you buy the same item in separate lots at different prices, the question at sale time is which cost to release. FIFO answers it the way most warehouses actually move goods: the oldest stock leaves first, so the oldest cost is the one you expense. That keeps your ending inventory valued at what you paid most recently, which is usually close to today’s replacement cost.
Most people who reach for a FIFO calculator want to check their own figures rather than read a lecture, so the tool comes first and the explanation second. There is also an honest section below on when tracking cost layers is more effort than your business needs.
FIFO calculator
What is FIFO and how is it calculated?
FIFO stands for first in, first out. It is an inventory cost-flow assumption: when you sell a unit, you assume it came from the oldest lot still on hand, and you record cost of goods sold at that lot’s price. You work through your purchase layers in the order they arrived, oldest to newest, until the sale is covered. As the Corporate Finance Institute puts it in its FIFO reference (checked 2026-07-23), the earliest costs are expensed first, so the most recent costs stay on the balance sheet as inventory.
Two things fall out of that rule and are worth holding onto:
- Cost of goods sold reflects your older, usually lower, purchase prices.
- Ending inventory reflects your newer, usually higher, purchase prices, so the balance-sheet value stays close to current cost.
The full FIFO concept guide walks through the method in more depth, including how it compares with LIFO and weighted average cost.
Worked example, step by step
Say you buy the same item in two lots and then make one sale:
- Buy lot 1: 100 units at $10.00 each.
- Buy lot 2: 100 units at $15.00 each.
- Sell 100 units.
Under FIFO the sale draws entirely from lot 1, the oldest, so cost of goods sold is 100 x $10.00 = $1,000. Ending inventory is the 100 units still sitting in lot 2, valued at 100 x $15.00 = $1,500. This is the same pattern the Corporate Finance Institute worked example shows: costing rising-price stock oldest-first produces a lower COGS than costing it newest-first would. Load these figures into the calculator above and you should land on COGS of $1,000 and ending inventory of $1,500.
If your next sale runs past 100 units, FIFO simply keeps going into lot 2: the first 100 units come out at $10.00 and the rest at $15.00. The calculator shows this split lot by lot so you can see exactly where each dollar of COGS came from.
FIFO the accounting method vs FEFO on the warehouse floor
One clarification that saves confusion: FIFO here is a cost-flow assumption for your books, not a rule about which physical box a picker grabs. On the floor, perishable and dated stock is usually rotated first-expired-first-out (FEFO), so the batch closest to its expiry date ships next. The two often line up, because the oldest stock is frequently the nearest to expiry, but FEFO is about physical rotation and traceability while FIFO is about which cost you release to COGS. If you need to track and pick by lot or expiry date, that is a traceability question, and the FIFO concept guide notes where the two ideas meet.
When does FIFO fit, and when is a simpler approach enough?
FIFO is a sound default, but it is not automatically the right choice for every business. Here is a straight read.
When FIFO is a good fit
FIFO suits you when it matches how goods actually move and when you want your balance sheet to reflect current costs. In particular:
- Your stock genuinely rotates oldest-first, which is the norm for perishable and dated goods, so the cost flow mirrors the physical flow.
- You want ending inventory valued near today’s replacement cost, which FIFO does because unsold units carry the most recent prices.
- You report under IFRS. FIFO and weighted average cost are the two cost formulas permitted by IAS 2, the IFRS inventories standard (checked 2026-07-23); LIFO is not permitted under IFRS, so for most businesses outside the US the practical choice is FIFO or weighted average cost.
One consequence to go in with eyes open: in a period of rising prices, FIFO releases your older, lower costs to COGS first, which produces a higher reported profit than a newest-first method would, and higher profit generally means higher taxable income. That is the trade-off for a balance sheet that stays close to current cost.
When a spreadsheet is genuinely enough
If you carry a small number of SKUs, buy in stable-priced or infrequent lots, and your volume is low, a spreadsheet that lists each purchase layer and draws down the oldest first does the job. There is no shame in it. Spreadsheets are how most businesses start costing their stock, and for a small, steady catalogue they stay accurate for a long time. The point where they stop keeping up is worth naming plainly: when you hold many open lots per SKU, when purchases are frequent, or when you need current COGS across a large catalogue at once, keeping the layers straight by hand turns into its own job, and one fat-fingered row quietly throws the numbers off.
When another costing method may suit you better
If your purchase prices bounce around and you would rather carry one smooth blended cost than track each layer, moving average cost is lighter to run: it re-blends after each purchase instead of holding separate lots. If you value inventory once at period end rather than transaction by transaction, that is periodic weighted average cost. And as above, LIFO is off the table under IFRS, so it is only a live option for US filers.
How Qoblex handles inventory costing
The calculator above is a simulator you drive by hand. Inside Qoblex, cost of goods sold is tracked automatically as stock moves, so the cost per unit you see reflects what you actually have on hand rather than a figure someone maintains in a sheet. Qoblex values inventory using a perpetual moving average cost approach, which suits most SMB operators reporting under IFRS or GAAP and keeps the cost per unit current without the layer-tracking overhead FIFO carries. If your accounting policy specifically requires FIFO layer costing, that is a conversation to have with your accountant about how it maps to your books.
Your accounting platform stays your book of record. Qoblex handles the operational inventory costing while QuickBooks Online or Xero keeps the ledger. If you also need to track physical lots and expiry dates for FEFO rotation, that lot and batch tracking is available as a paid add-on rather than part of the base plan. For current plans and add-ons, see qoblex.com/pricing.
FAQ
What is the FIFO method in simple terms? FIFO (first in, first out) assumes the oldest units you bought are the first ones sold. When you record a sale, cost of goods sold comes from your earliest purchase lots in order, and the units left over, your ending inventory, are valued at your most recent purchase costs.
How do you calculate COGS using FIFO? Work through your purchase lots oldest to newest. For each sale, take units from the oldest lot first at that lot’s cost, then move to the next lot once it runs out. Add up those lot costs to get cost of goods sold. Whatever units remain, valued at their lot prices, are your ending inventory.
What happens to ending inventory under FIFO? Ending inventory is carried at your most recent purchase costs, because the older costs have already been released to COGS. That keeps the balance-sheet value of stock close to current replacement cost.
Does FIFO increase or decrease profit when prices are rising? In a period of rising prices, FIFO expenses your older, lower costs first, so COGS is lower and reported profit is higher than under a newest-first method. Higher reported profit generally means higher taxable income.
Is FIFO allowed under IFRS and US GAAP? Yes. FIFO is permitted under both IFRS and US GAAP. Under IFRS, the permitted cost formulas are FIFO and weighted average cost; LIFO is not permitted, so businesses reporting under IFRS choose between FIFO and weighted average cost.
Is FIFO the same as FEFO? No. FIFO is an accounting cost-flow assumption about which cost you release to COGS. FEFO (first expired, first out) is a physical picking rule for perishable or dated stock, shipping the batch nearest its expiry date first. They often coincide but answer different questions.
When should I use FIFO instead of moving average cost? Use FIFO when you want ending inventory valued at recent costs or your stock rotates oldest-first, as with perishables. Consider moving average cost when your prices move around and you would rather carry one blended cost than track each lot separately.
