Blog
FEFO vs FIFO: which rotation your store actually needs
24 September 2026 · Datima.ai
Two four-letter rules, one letter apart, and most stores run the wrong one without knowing it. FIFO — first in, first out — ships stock in the order it arrived. FEFO — first expired, first out — ships it in the order it expires. For a warehouse full of screws they are the same rule. For anything with a date on it they are not, and the difference is the write-off line on your P&L.
When the two rules disagree
Take one product, two deliveries. On 10 September, 40 jars arrive with a best-before of 1 December. On 15 September, 24 jars arrive with a best-before of 5 November — the supplier cleared an older production run, which happens more than anyone admits. Under FIFO, the September-10 delivery ships first because it came first, and the November-5 jars sit at the back of the shelf until they are the only ones left. Under FEFO, the November-5 jars ship first, and nothing waits.
The gap looks small on paper. Across a catalog of a few hundred perishable SKUs it is the difference between a discount bin that appears on time and one that appears the week after the date.
Why FIFO is the default everywhere
Because FIFO answers a different question. It is an accounting convention about cost: which purchase price leaves the books when a unit sells. Warehouse systems inherited it because it is easy — you know when a pallet arrived without opening it. Neither reason has anything to do with freshness. You can keep FIFO for your accounts and still pick by FEFO; the two do not have to agree, and for perishables they should not.
What FEFO needs from your software
FEFO cannot be a note on the wall. Shopify counts units per variant; it has no idea that your 64 jars are two batches with two dates. So the rule has to live in something that keeps batches and sees every order. In practice that means:
- Batches with dates. One row per delivery, with the quantity remaining, the expiry date, and ideally a lot code and a bin so the picker can find it.
- A deduction on every sale, per location. When an order is fulfilled, the units come off the earliest unexpired batch at the location that shipped it. Stock in another warehouse is not consumed by a sale it never saw.
- Refunds that go back where they came from. A return restores the batch it was taken from, not “the product”.
- Honesty about gaps. If a sale outruns what was recorded — a delivery nobody entered — the system should say “unmatched” and let you fix it, not quietly borrow from another batch.
- Corrections that keep history. When the picker took the other lot, you should be able to say so, and the record should keep both the guess and the correction. Recall time is not the moment to discover the trail was overwritten.
These are exactly the awkward cases where trust in the numbers is won or lost. They are also, not by coincidence, where most of the engineering time in Datima went.
The number FEFO gives you that FIFO cannot
Once consumption is per batch, one figure falls out for free: value at risk by window — what expires within 7, 30 and 90 days, in money, at your price. That is the number that decides a promotion, a bundle, or a call to the supplier. Under FIFO you can compute it too, but it is wrong, because the units you think are old are not the ones on the shelf.
What about LIFO, or just picking by hand?
Last-in-first-out has its place in accounting and almost none on a perishable shelf. Picking by hand — the person at the shelf reads the dates — works while one person does all the picking and never has a day off. The realistic version is FEFO in the software and a picker who is told which lot code and which bin; the app does the arithmetic, the human does the walking.
If your stock has dates, run FEFO. Datima does it on every Shopify order, refunds included, and shows you the value at risk by window — free, with no product limit. The three-minute demo shows the shipment history behind a real product, batch by batch.