What is FIFO?
First-In, First-Out — inventory valuation that consumes the oldest cost layers first.
FIFO stands for First-In, First-Out: an inventory valuation method that assumes the oldest units you bought are the first ones sold. When you record a sale under FIFO, you draw down your earliest cost layer first, so cost of goods sold reflects what your oldest stock cost, and your remaining inventory is valued at your most recent purchase prices. It is the most intuitive of the inventory methods because it mirrors how goods physically move through most warehouses, oldest stock out the door first.
For ecommerce and Amazon sellers buying the same SKU at prices that drift over time, FIFO matters because of how it splits cost between COGS and ending inventory. In a period of rising unit costs, FIFO assigns the older, cheaper costs to what you sold and leaves the newer, higher costs sitting in inventory, which produces a lower COGS and a higher reported profit than weighted average. Knowing which way your method leans is the difference between books that reflect reality and a margin number you cannot trust.
Worth clearing up early: FIFO is a costing convention, not a warehouse instruction. Your books can use FIFO even if Amazon ships from the pallet that arrived last week. The method describes how cost flows, not how cardboard moves.
How to calculate FIFO cost of goods sold
Under FIFO you track inventory in cost layers, each purchase is its own layer at its own landed cost, and you consume them in the order they arrived. To compute COGS, you peel units off the oldest layer first; when that layer is exhausted, you move to the next. The cost of the layers you consumed is your FIFO cost of goods sold, and whatever layers remain make up ending inventory.
Written as a formula, the FIFO cost of goods sold formula is a sum rather than a single line: COGS = the units drawn from each layer multiplied by that layer's landed unit cost, added up oldest layer first until you've covered the quantity sold. Ending inventory is the mirror image: remaining units in each open layer times that layer's cost. The FIFO formula accounting textbooks pair with it is the identity you use as a check, beginning inventory plus purchases minus ending inventory equals COGS, which holds under any costing method and is the fastest way to catch an arithmetic slip. Anyone hoping for a one-line shortcut is usually about to reinvent weighted average by accident.
Worked example: you buy 100 units at $10 (layer 1), then 100 units at $14 (layer 2). You sell 150 units. FIFO consumes all 100 from layer 1 ($1,000) plus 50 from layer 2 (50 x $14 = $700), so COGS is $1,000 + $700 = $1,700. Ending inventory is the 50 units left in layer 2, valued at 50 x $14 = $700. Note how the higher $14 cost ends up in ending inventory, not COGS, exactly the opposite of how it would split under a method that consumes newest-first.
Partial layers are what people get wrong by hand. Layer 2 is now half consumed, so it carries forward as 50 units at $14, not as a fresh layer. Your next sale eats that remainder before touching anything bought afterward. Keep a running table of open layers with remaining quantity and unit cost and the method stays mechanical.
- •Track each purchase as a cost layer at its landed cost
- •Layer 1: 100 units x $10 = $1,000
- •Layer 2: 100 units x $14 = $1,400
- •Sell 150 units: consume 100 from layer 1 ($1,000) + 50 from layer 2 ($700)
- •FIFO COGS = $1,700; ending inventory = 50 units x $14 = $700
Calculating ending inventory across a quarter
Extend the example. Carry those 50 units at $14 into month two, then buy 200 at $15 (layer 3) and 150 at $12 (layer 4) after your supplier drops price on a reorder. You now hold 400 units across three open layers worth $700 + $3,000 + $1,800 = $5,500.
Sell 300 units and FIFO consumes them in arrival order: all 50 at $14 ($700), all 200 at $15 ($3,000), then 50 at $12 ($600). COGS is $4,300 and ending inventory is the 100 units left in layer 4 at $12, so $1,200. Check it the easy way: opening value plus purchases minus COGS should equal ending inventory. $5,500 minus $4,300 gives $1,200. It ties.
That reconciliation is how to calculate ending inventory under FIFO without trusting a spreadsheet blindly. If the numbers don't tie, you've double-counted a layer, consumed one out of order, or lost units to an unrecorded adjustment.
FIFO vs LIFO vs weighted average
FIFO is one of three common inventory methods. LIFO (Last-In, First-Out) does the reverse, consuming the newest cost layers first, which in a rising-cost environment produces a higher COGS and lower profit, but LIFO is barred under IFRS and rare outside specific US tax situations. Weighted average blends all costs into one per-unit figure and reacts more gently to price swings than either FIFO or LIFO.
The practical difference is timing and tax. When unit costs are rising, FIFO reports the lowest COGS and the highest profit of the three (LIFO the highest COGS, weighted average in between). That higher FIFO profit can mean a higher tax bill in the near term, while the higher inventory value strengthens your balance sheet. There is no universally correct choice, but you must pick one method, apply it consistently, and understand which way it pushes your reported margin.
Falling costs flip the picture, which matters in categories with rapid price erosion. If supplier price drops each quarter, FIFO pushes older expensive units into COGS and leaves cheap recent stock on the balance sheet, so profit looks worse and inventory looks lighter. Same method, opposite effect.
- •FIFO: oldest costs to COGS; in rising costs, lowest COGS, highest profit
- •LIFO: newest costs to COGS; in rising costs, highest COGS, lowest profit (not allowed under IFRS)
- •Weighted average: one blended cost; sits between FIFO and LIFO
- •Whichever you choose, apply it consistently across periods
When FIFO is the right choice for sellers
FIFO is a strong default when the physical flow of your goods actually is oldest-first, which it usually is, and when batch or shelf-life tracking matters. Products with expiration dates, lot numbers, or version changes benefit from FIFO because the cost layers line up with the units you are genuinely selling, and your ending inventory reflects current replacement cost rather than stale prices.
The trade-off is bookkeeping effort: FIFO requires you to maintain cost layers per SKU and consume them in order, which is tedious by hand across a large, fast-moving catalog. This is precisely the kind of work accounting software should carry. Whether you run FIFO layers or perpetual weighted average, BeanHawk values inventory from landed cost so your cost of goods sold reflects the real all-in cost of each unit, and your books stay cash-accurate.
FIFO also earns its keep in a business being prepared for sale. Cost layers give a diligence team something to test: pick a SKU, look at the open layers, trace each to a purchase order, confirm the balance sheet number. A blended average is defensible too, just harder to audit back to source documents.
How FIFO is recorded in your books
The journal entries under FIFO are identical to any other costing method; only the amount changes. Receiving stock debits Inventory and credits Accounts Payable at landed cost. Selling a unit debits COGS and credits Inventory at the cost of whichever layer is being consumed. Revenue is a separate entry entirely and should never be netted against COGS.
Where FIFO differs is in what your general ledger can hold. Layer tracking is SKU-level detail, and posting it line by line into a ledger built for a service business will bury it. Standard practice in ecommerce accounting is to keep layers in a subledger, then post one summarized COGS journal per period. The ledger shows a clean figure; the subledger holds the evidence.
This matters if you're using quickbooks for amazon sellers or Xero. QuickBooks Online uses average costing on inventory items rather than true FIFO layers, Desktop offers FIFO only on higher tiers, and Xero doesn't layer natively. Sellers who want genuine FIFO run it outside the ledger and feed in a monthly journal. It's also why the settlement connectors most people install (A2X, Link My Books) don't solve costing: they handle revenue and fees, not cost layers.
- •Receipt: debit Inventory, credit Accounts Payable at layer landed cost
- •Sale: debit COGS, credit Inventory at the oldest open layer's cost
- •Partial layer: carries forward with remaining quantity and original unit cost
- •Write-off: debit inventory adjustment expense, credit Inventory at layer cost
- •Ledger posting: summarize COGS monthly, keep layer detail in a subledger
FIFO in FBA reality
Amazon does not pick your oldest units first. Fulfillment centers ship whatever is closest to the customer, your stock may be split across a dozen warehouses, and under commingled inventory the unit that ships might not be one you sent. None of this breaks FIFO, since FIFO governs cost flow, but it does mean you can't reconcile layers against physical batch numbers.
Removals, disposals, and lost units need a rule. Consume them from the oldest open layer, same as a sale, so the sequence stays intact. Reimbursements Amazon later pays land as separate income rather than reducing COGS, otherwise the recovery gets buried.
Aged stock creates a related decision. Units sitting for months are usually your oldest layers, so FIFO already charges their cost to COGS first, but the units may be worth less than you paid. A write-down for unsellable inventory is a separate entry from layer consumption, and conflating the two makes both harder to explain.
FIFO and your landed cost
FIFO is only accurate if each cost layer is built on true landed cost, the supplier price plus freight, duty, taxes, and prep for that specific shipment, rather than just the invoice. Because FIFO keeps your most recent costs in ending inventory, getting landed cost right on the latest layers directly affects your balance-sheet inventory value, and getting it right on older layers directly affects the COGS you book today.
Sloppy landed-cost allocation distorts FIFO in both directions: understated COGS inflates current profit, and an understated inventory value weakens your balance sheet. Building each FIFO layer from fully allocated landed cost gives you a defensible inventory valuation and a gross margin you can actually trust, which is what flows through to your profit and loss statement and your tax return.
The late freight invoice is the recurring headache. Ocean freight often bills weeks after a container clears, by which point units from that layer have sold. Accrue an estimated freight cost when you open the layer, then adjust when the real invoice lands. Sellers doing amazon fba accounting at any scale build that true-up into the monthly close.
Common FIFO mistakes
Consuming layers out of order is the obvious one, and it happens most when a shipment is entered late. Backdate receipts to actual arrival, not to the day you recorded them.
Second: opening a new layer for a return. A sellable return goes back into the layer it came from at its original cost. A fresh layer at zero, or at current cost, corrupts every calculation after it.
Third: bundles. A multipack SKU needs its own layers, built from component cost times pack size plus prep. Assign single-unit costs to a 3-pack and you report a third of true COGS.
Fourth, and hardest to catch: negative layers. If a sale is recorded for a SKU whose layers are exhausted, most systems either error out or silently invent a cost. With FBA this happens constantly, because Amazon receives inbound shipments before you record them. Fix the receipt timing, don't plug the gap with a manual journal.
Choosing tooling for FIFO
With a handful of SKUs and a few purchase orders a year, a spreadsheet genuinely works. One tab per SKU, one row per layer, columns for date, quantity received, landed unit cost, quantity consumed, quantity remaining. Building it once teaches you more about your costs than any dashboard will.
It stops working when layer counts grow, when several people touch the file, or when you need a monthly close on a deadline. At that point look for accounting software for amazon sellers that maintains layers from landed cost, applies returns and removals against the right layer, and posts a summarized COGS journal to your ledger. Dedicated amazon inventory software often tracks quantity beautifully and does nothing with cost, so ask about costing specifically.
The test to run during any trial: take one SKU with at least three purchase orders, push a month of real sales through it, and check that opening value plus purchases minus COGS equals ending inventory. If the tool can't show that, it isn't doing FIFO.
Frequently asked questions
- What does FIFO stand for?
- FIFO stands for First-In, First-Out. As an inventory method, it assumes the oldest units you purchased are the first ones sold, so cost of goods sold draws on your earliest cost layers and ending inventory is valued at your most recent purchase prices.
- How do I calculate cost of goods sold using FIFO?
- Track each purchase as a cost layer and consume the oldest layer first. Sum the cost of the layers you used up to cover the units sold, that total is your FIFO COGS. For example, selling 150 units across a $10 layer of 100 and a $14 layer gives COGS of $1,000 + $700 = $1,700.
- What is the difference between FIFO and weighted average?
- FIFO consumes the oldest cost layers first, while weighted average blends all costs into one per-unit figure. In a period of rising costs, FIFO reports a lower COGS and higher profit than weighted average, which reacts more gently to price swings.
- Does FIFO increase or decrease profit?
- When unit costs are rising, FIFO reports a lower COGS and therefore a higher profit than LIFO or weighted average, because the older, cheaper costs flow to COGS. That can mean a higher near-term tax bill but also a stronger inventory value on the balance sheet. If your costs are falling, the effect reverses.
- Is FIFO better than weighted average for Amazon sellers?
- Neither is universally better. FIFO suits products where physical flow is oldest-first or where batch and shelf-life tracking matter; weighted average is simpler for high-volume SKUs bought repeatedly. Pick one, build it on landed cost, and apply it consistently.
- Does FIFO still work if Amazon ships my newest units first?
- Yes. FIFO is a costing convention, not a picking rule, so your books consume the oldest cost layer regardless of which physical unit left the warehouse. The gap only matters if you need batch-level traceability, in which case commingled FBA inventory is the bigger problem.
- Does QuickBooks support FIFO for ecommerce sellers?
- Partially. QuickBooks Online uses average costing on inventory items rather than true FIFO layers, and Desktop offers FIFO only on higher tiers. Xero doesn't layer natively. Most sellers who want real FIFO keep layers in a separate system and post a summarized monthly COGS journal into the ledger.
- What should amazon accounting software do with FIFO layers?
- It should build each layer from landed cost rather than supplier invoice price, consume layers in receipt order, apply returns and removals against the correct layer, handle bundle SKUs, and hand your ledger a summarized journal instead of thousands of raw lines. A2X and Link My Books cover the settlement side and leave costing to you; BeanHawk handles landed cost and valuation alongside the ledger sync.
Related terms
Go deeper
See what Amazon owes you — free
Connect your seller account and get a free reimbursement audit. No credit card, keep 100% of what you recover.