Ubika
← Ubika blog

FIFO, FEFO and LIFO: what leaves your warehouse first

November 2, 2026 · 6 min read

When you have several units of the same item, someone decides which one leaves first. If each operator decides, you end up shipping what arrived last and letting what was at the back expire. FIFO, FEFO and LIFO are the three rules for deciding it the same way every time.

What FIFO, FEFO and LIFO are

  • →FIFO (First In, First Out): ordered by date of entry. It is the rule for most products.
  • →FEFO (First Expired, First Out): ordered by expiry date. For food, cosmetics, over-the-counter health products and anything that carries a date.
  • →LIFO (Last In, First Out): uncommon; for products that do not age and are stacked.
Swipe the table sideways to see all the columns →
RuleWhat leaves firstFor which productsWhat has to be recorded
FIFOWhat came in firstProducts with no expiry that change over time: fashion, electronics, spare partsDate of entry (or lot)
FEFOWhat expires firstFood, drinks, cosmetics, over-the-counter health products, chemicalsLot and expiry date
LIFOWhat came in lastBulk or stacked material that does not expireNothing special

FIFO: first in, first out

It is the default rule. Even if the product does not expire, it ages: the packaging changes, a new version comes out, the box gathers dust. With FIFO the oldest stock does not stay at the back.

On the shelf it is achieved in two ways: with racking that is loaded from the back and picked from the front, or by recording the date of entry of each lot and letting the software send the operator to the oldest bin.

FEFO: first expired, first out

With dated product, what matters is not when it arrived but when it expires. And the two do not always coincide: the supplier may send you today a lot that expires before the one they sent you last month. With FIFO the old lot would leave first and the new one would stay on the shelf until it expired.

FEFO also has one more twist: many clients require the product to arrive with a minimum margin before expiry. A lot can be in date and still be no good for a particular shipment. That is why you have to know at all times which lots you have, how much of each and when they expire, and set aside what can no longer be shipped.

If you work with food or cold storage, there is more detail in warehouse software for food and frozen goods.

LIFO: last in, first out

Rather than being chosen, it is imposed by how things are stored: pallets block-stacked against a wall, bulk material in a pile, compact racking with access from one side only. The last thing put in is the only thing that can be taken out without moving the rest. It is only acceptable if the product does not mind waiting: aggregates, bricks, empty containers. If the product ages and your storage forces LIFO on you, what has to change is the storage.

How to choose the rule for each product

  • →Does it carry an expiry or best-before date? FEFO.
  • →Does it not expire but change over time (versions, seasons, packaging)? FIFO.
  • →Does it neither expire nor change, and is it stacked with no access to the back? LIFO may do.
  • →Do you have all three types? The rule is set per product or per family, not one for the whole warehouse.

What it takes to enforce them

  • →Recording the lot and the date on receipt. If the box carries a GS1 code with the lot and the expiry date, they are read with one scan and do not have to be typed in.
  • →Not mixing lots in the same bin, or keeping them clearly separated and identified.
  • →Having the software choose the bin and the lot when picking, not the operator.
  • →Having the scan prevent a lot other than the one indicated from being taken.
  • →Reviewing every week what expires soon, to move it out or set it aside.

Common mistakes

  • →Putting the new lot in front of the old one because “there was room”.
  • →Applying FIFO to product with an expiry date, taking it for granted that what arrived first expires first.
  • →Replenishing the picking bin without looking at the lot and mixing dates.
  • →Putting a return back into stock without noting which lot it was from.
  • →Trusting the operator to look at the date on every box. In a hurry, they take the nearest one.

In Ubika each item can carry a lot and an expiry date, and outbound is ordered by FEFO, FIFO or LIFO depending on the product. On receipt, the GS1 code on the box fills in the lot and the expiry date; when picking, the PDA indicates the lot that is due. This is how it is controlled with the PDA. To check that the stock of each lot is what the software says, see cycle counting.

Frequently asked questions

What does FEFO mean?
It stands for “First Expired, First Out”: what expires first is what leaves first. It is ordered by expiry date, not by date of entry.
What is the difference between FIFO and FEFO?
FIFO ships first what came in first; FEFO ships first what expires first. They usually coincide, but not always: a lot that arrived later can expire sooner, and then FIFO would ship the wrong lot.
When is LIFO used?
When the product neither ages nor expires and is stored in such a way that the last thing in is what is closest to hand, as in bulk piles or block storage with access from one side only. It is uncommon in online store warehouses.
What does it take to apply FEFO?
Recording the lot and the expiry date on receipt, having them identified in the bin and having the software indicate which lot to take from when picking the order, with a scan that checks it.
What is the minimum shelf life a client asks for?
It is the number of days left until expiry that a client requires when receiving the product. A lot may not have expired and still be no good for that client, so FEFO is applied within the lots that meet that margin.
Are FIFO and LIFO also accounting methods?
Yes, the same acronyms are used to value inventory in accounting, but that is a different matter. Here we are talking about the physical order in which the goods leave; the valuation method is set by accounting rules and you decide it with your accountant.

Keep reading

What Ubika does: warehouse management software · software for 3PLs · WMS for e-commerce

Tell us how you work and we'll set it up

Tell us what you move, which stores and carriers you use and how you run it today. We fit it to your warehouse; anything missing, we build.

No lock-in, no card required. You can also email us at hello@ubikawms.com.