Now in open beta — close the books in 2 days, not 2 weeks.Read the case study →
Inventory · February 19, 2026 · 9 min read

Pharmacy inventory software: FEFO expiry tracking

A pharmacy that sells a near-expiry strip when a fresh strip is on the same shelf has a process failure that puts patients at risk and inventory at write-off. FEFO — first expiry first out — exists to make this impossible.

Why fifo is not enough.

FIFO assumes the order of receipt matches the order of expiry. For most products this is true: stock you bought first will expire first. But not always. A pharmacy might receive a bulk order in March with December expiry, then receive a smaller order in April with August expiry. Strict FIFO would sell the March stock first, leaving the April stock to expire on the shelf in August.

FEFO sorts by expiry date instead of receipt date. Same example, FEFO sells the August-expiry stock first, then the December stock. Nothing expires on shelf, no patient gets a near-expiry product when a fresher one is available. This single rule, properly enforced, eliminates 90% of pharmacy expiry write-off.

What proper batch tracking looks like.

Every receipt of a tracked SKU lands in inventory as a batch, not just a quantity. A batch has: SKU code, quantity, manufacturer batch number, manufacture date, expiry date, supplier invoice reference. When the same SKU arrives in two shipments with different batches, you have two batch records, not a merged WAC pile.

On sale, the system selects the batch with the earliest expiry that has stock available. The cashier or picker scans the SKU; the system tells them which batch to pull from. If the picker grabs a different batch by mistake, the scan flags it. The cost of the chosen batch is what posts to COGS for that sale. Batch tracking and FEFO are two sides of the same coin — you cannot do FEFO without batches.

  • Batch number from manufacturer (regulatory requirement)
  • Manufacture date and expiry date (mandatory for pharma, recommended for FMCG)
  • Supplier invoice reference (for traceability and recalls)
  • Quantity remaining per batch (decreases on each sale)

A worked example with three batches.

A Toronto pharmacy receives Batch A on Jan 10 with 100 units, expiry Aug 31. On Feb 15 receives Batch B with 50 units, expiry June 30. On March 1 receives Batch C with 80 units, expiry October 31. Total stock: 230 units across 3 batches.

A customer buys 60 units on March 5. Pure FIFO would pull from Batch A (received first). FEFO pulls from Batch B (expires soonest), leaving 0 of B, 100 of A, 80 of C. The next customer buys 50 units on March 10. FIFO would pull from Batch A again. FEFO pulls 50 from Batch A (next expiry after B is now A on Aug 31). Net result: by the time June 30 comes around, Batch B is fully sold; Batch A is fully sold by Aug 31; only Batch C remains, with 4 months of shelf life left.

Pure FIFO · received-first winsFirst 60 sold · Batch A (Jan)Next 50 sold · Batch A againBatch B expires unsold (Jun 30)Write-off: 50 units × costFEFO · earliest-expiry winsFirst 60 sold · 50 of B + 10 of ANext 50 sold · 50 of ANothing expires on shelfWrite-off: 0 units
Same three batches, same customers. FIFO writes off 50 units; FEFO writes off zero.

How fefo handles a recall.

In April the manufacturer announces Batch B is recalled — contamination concern. Without batch tracking, you would have to pull every unit of that SKU from every shelf. With batch tracking, you query the system: which customers bought units from Batch B between Feb 15 and today? The answer is a list of 38 invoices. You contact those customers, recover the units, and post the recall as a write-off of all remaining Batch B stock plus the recovered units.

The journal for a recall: Debit Inventory Loss (or Recall Receivable if claimable from manufacturer), Credit Batch B inventory at its WAC. Every line is documented per batch. This is the difference between a regulatory inspection that takes one hour and one that takes one week. The FDA, MHRA, and Health Canada all increasingly expect batch-level recall capability as a baseline.

Fefo across multiple branches.

A multi-branch pharmacy chain has the additional problem of stock in 8 places. One branch has 30 units of a SKU expiring next month; another has 200 units of the same SKU expiring in 9 months. Without cross-branch FEFO, the first branch will expire 30 units while the second over-stocks the longer-dated batch.

The fix is a near-expiry alert that triggers a transfer recommendation. Nonari flags any batch with under 60 days of shelf life, suggests transfer to a branch with high turnover or low stock, and pre-fills the transfer document. The branch manager approves and the goods move under the standard transfer-with-in-transit-account workflow. Most chains recover 4-6% of pharma write-off this way.

Pricing markdowns near expiry.

Some pharma items can be sold at a markdown when within 30 days of expiry — generally OTC and some FMCG, never prescription pharma without local rules confirming it. The system needs to flag near-expiry batches so the cashier can apply the markdown automatically. Nonari supports an expiry-based markdown rule: any sale of a batch within X days of expiry triggers Y% off, posted to Markdown Expense.

The journal: Debit Markdown Expense for the discount value, Debit Cash for the discounted price, Credit Sales Revenue at full list, Credit Inventory at WAC, Debit COGS at WAC. Markdown is tracked separately from regular sales, so gross margin reports show how much you are giving up to clear near-expiry stock — a useful KPI to keep purchasing honest.

Setting up fefo in a working pharmacy.

Step 1: enable batch tracking on all SKUs that have an expiry — this might be 60% of your catalog for a pharmacy, 30% for an FMCG distributor. Step 2: enforce expiry capture at receipt. The receiver cannot save a goods receipt without entering expiry on every batch-tracked line. Step 3: configure FEFO as the default issue method on those SKUs. Step 4: turn on near-expiry alerts at 60, 30, and 14 days.

Step 5 is the hardest: train staff. Pickers used to grabbing whatever is at the front need to learn to follow the system pick instruction. Do this with carrot and stick — a small bonus for a clean batch month, a write-off review for branches that consistently expire stock that the system told them to sell first. Six months in, expiry write-off should drop by half or more.

Frequently asked

Common questions.

Is FEFO required by drug regulators?

The FDA (US), MHRA (UK), TGA (Australia), and most other pharma regulators require batch traceability and expiry control. FEFO is the practical implementation. Pharmacies without it risk findings during inspection.

Can I use FEFO for non-expiring items?

No need. Use WAC or FIFO for non-expiring items. FEFO adds operational overhead worth bearing only when expiry exists.

What if the manufacturer batch number is missing?

Refuse the goods. A pharma receipt without manufacturer batch and expiry is not auditable and is a regulatory risk. The supplier should always provide them on the invoice.

How does Nonari handle near-expiry write-offs?

Nonari flags batches at configurable expiry thresholds, supports markdown rules, and on actual expiry posts the remaining batch to Inventory Loss with the original supplier and cost trail intact.

Can I do FEFO without batch tracking?

No. FEFO requires that stock of the same SKU be distinguishable by expiry date. That is what batch tracking provides. Without batches, the system cannot know which units to pick first.

Try nonari

Put your books on autopilot.

Free to start. No credit card. Bring your books, kick the tires, export everything if you decide to leave.