These three terms get used as though they were synonyms, and in casual speech that rarely matters. In a system design or on a label it matters a great deal, because two of them are regulated statements with different legal consequences and the third is not a date at all. The most expensive version of the confusion is a single database column called expiry_date that is used to hold whichever of them the supplier happened to print, after which nobody can tell whether stock past that date is merely past its best or actually unlawful to sell.
The message up front: shelf life is a duration, a property of the product. Best before and use by are dates printed on a pack, and under EU rules they mean different things: best before is about quality and food past it may still be safe, while use by is about safety and food past it is deemed unsafe and may not lawfully be placed on the market. If your system stores one date field with no indication of which kind it is, you cannot apply the right rule to it, and the rules are genuinely different.
1. Shelf life is a duration, not a date
Shelf life is the period during which a product retains its intended qualities and safety under stated storage conditions. It is expressed as a length of time: 18 months, 14 days, 5 years. It is a property established by the manufacturer, usually through stability or shelf-life studies, and it belongs on the item master.
Everything else follows from it arithmetically. A product with a 180 day shelf life made on 1 March carries a date of 28 August. The date is derived; the shelf life is the input. That is why shelf life belongs to the item and the date belongs to the lot, and why conflating them produces a data model that cannot answer either question properly.
Two qualifiers do real work in that definition and are routinely dropped:
- "Under stated storage conditions." A shelf life is only valid for the conditions it was established under. The same product has a different shelf life frozen, chilled and ambient. A shelf life quoted without its storage condition is incomplete information, not a shorter way of saying the same thing.
- "Intended qualities and safety." These can diverge, and which one runs out first determines which kind of date the pack should carry. That is the whole basis of the distinction in the next two sections.
2. Best before: a quality statement
In the European Union the relevant instrument is Regulation (EU) No 1169/2011 on the provision of food information to consumers, which the European Commission summarises on its food information to consumers legislation page . It calls this the date of minimum durability, and the label wording is set by its Annex X: "best before" where the date includes a day, and "best before end" where it does not.
What it means is that up to that date, stored as directed, the food retains its expected qualities. The European Commission's position is that food beyond its best before date may still be safe to consume, provided storage instructions were respected and the packaging is undamaged. Quality may have degraded. Safety has not necessarily been lost. Ireland's Food Safety Authority sets out the same distinction in plainer terms on its shelf life, best before and use by guidance , which is a useful cross-check when you are deciding which date a product should carry.
The operational consequence is that stock past a best before date is a commercial decision rather than a legal prohibition. It may be unsellable, it may be donated or discounted where national rules permit, and it is not automatically waste. Treating it as automatically waste is a widespread and costly error, and it usually traces back to a system that models every date as an expiry.
3. Use by: a safety statement, with teeth
The same regulation requires a use by date instead of a date of minimum durability for foods that are, from a microbiological point of view, highly perishable and therefore likely after a short period to constitute an immediate danger to human health. The label wording must be accompanied by the storage conditions.
The part that changes how this must be handled in a system is the legal effect. Under Article 24(1) of that regulation, after the use by date a food is deemed unsafe, and placing unsafe food on the market is unlawful. That is not a quality judgement to be weighed commercially. It is a hard stop.
Why one date column is not enough
Past a best before date, selling the stock is a commercial judgement. Past a use by date, in the EU, selling it is unlawful. Those require different system behaviour: one is a warning, the other must block the transaction. A single expiry_date column with no type indicator cannot distinguish them, so the system either blocks stock it should only warn about, destroying good product, or warns about stock it should block, which is the serious direction. Store the date and its kind.
Three further points from the EU rules that affect label and system design:
- Carrying both kinds of date on one pack is not permitted. A product has one or the other, not both.
- Which one applies is decided product by product, by the food business operator. It is not a category rule you can hard-code by product group; it is a judgement the manufacturer makes and must be able to justify.
- Non-prepacked foods need neither. Under Article 44, a best before or use by date does not have to be declared on non-prepacked food.
4. The rules are not universal: the United States is different
Everything above is European Union law and has no force elsewhere. The United States takes a markedly different approach, and assuming the EU model applies there is a common and consequential mistake.
According to USDA's Food Safety and Inspection Service, except for infant formula, federal law and regulation do not require quality-based date labels on packaged food at all. Dates are applied voluntarily. FSIS also states that, other than infant formula, dates are not an indicator of the product's safety. For meat, poultry and egg products, dates may be applied voluntarily provided they are truthful, not misleading and compliant with FSIS regulations.
The exception is infant formula, which FSIS describes as requiring a "Use-By" date under FDA regulation. Note the attribution: that is USDA describing an FDA requirement rather than FDA's own statement of it, so if you need to rely on it, go to the FDA infant formula regulations directly.
On wording, FDA supports industry efforts to make "Best if Used By" the standard phrase for a quality date, as set out in its guidance on cutting food waste while maintaining safety . That is encouragement towards a voluntary convention, not a mandate. The US statements above come from USDA FSIS guidance published under the title "Food Product Dating", which is worth reading in full if you label for that market.
Jurisdiction, and the limit of this article
Two jurisdictions are described here because they are the two most often referenced in system design. Many others set their own rules, and this article is not a survey of them. Nothing here is regulatory advice, no national implementation is covered, and a legal duty from one jurisdiction has no effect in another. If you are labelling for a market, verify against that market's own authority. What travels between jurisdictions is the system lesson: store the date type alongside the date.
5. The three side by side
| Dimension | Shelf life | Best before | Use by |
|---|---|---|---|
| What it is | A duration | A date on the pack | A date on the pack |
| About | Both quality and safety | Quality | Safety |
| Belongs to | The item master | The lot | The lot |
| Past that point, in the EU | Not applicable | May still be safe; selling is a commercial decision | Deemed unsafe; unlawful to place on the market |
| System behaviour | Input to a calculation | Warn, flag, discount | Hard block |
| EU label wording | Not a label field | "best before" or "best before end" | "use by" plus storage conditions |
| Common misuse | Quoted without its storage condition, which makes it meaningless | Treated as an expiry, so good stock is destroyed | Treated as a quality date, which is the dangerous direction |
6. How to model this so the right rule can be applied
The structure that works separates the duration from the date and records which kind of date it is:
shelf_life_days,
storage_condition, -- the shelf life is only valid for this
date_type, -- 'use_by' | 'best_before' | 'none'
min_life_on_receipt_days)
lot (lot_id, item_id, lot_code,
mfg_date,
durability_date, -- the printed date, whichever kind
date_type_actual) -- what the SUPPLIER actually printed
Four design notes, each of which exists because of a failure I would expect to see otherwise:
- Name the date field for what it is, not
expiry_date. Calling itdurability_dateorpack_dateforces the reader to look up the type, which is the correct behaviour. A column calledexpiry_dateinvites everyone to assume a hard stop. - Keep
date_type_actualon the lot, separate from the item default. A supplier may print a use by on a product you classify as best before, or vice versa. The lot records what arrived; the item records what you expect. Where they disagree, that is a finding worth surfacing at receipt. - Drive availability from a rule, not from the date alone. A use by in the past blocks the pick; a best before in the past flags it for review. The branch is on
date_type. min_life_on_receipt_daysis the control that prevents the real problem. Accepting stock with three days of life left on a 180 day product is how dated stock accumulates. This belongs as a goods receipt check, not a month-end report.
One further wrinkle worth knowing: the GS1 barcode field for this, Application Identifier (17), is titled "USE BY or EXPIRY" and does not distinguish a safety date from a quality date. So the encoded date tells a receiving system when, but not which kind. The human-readable text on the pack is what carries that, which means the two have to be generated consistently from the same source. The identifier detail is in generating batch and lot barcodes using GS1 standards.
7. Where this meets stock rotation
Dated stock is the reason FEFO exists. Rotating by earliest date rather than earliest receipt is the only policy that reflects the fact that two deliveries of the same item can carry very different remaining life. The rotation methods themselves, and when each is appropriate, are covered in FEFO vs FIFO vs LIFO stock rotation, and the operational side of managing dated stock in expiry date management.
The point specific to this article is that FEFO on a mixed date-type population needs care. Sorting by date alone treats a best before and a use by as equivalent, which they are not. Where an item population includes both, the rotation rule should consider the type, because the consequence of being late differs.
8. The mistakes worth naming
- One
expiry_datecolumn holding whichever date the supplier printed. The root cause of most of what follows. - Treating best before as a hard stop. Good stock destroyed, needlessly.
- Treating use by as advisory. The serious direction, and in the EU unlawful.
- Quoting a shelf life without its storage condition. An 18 month shelf life means nothing without knowing at what temperature, and the figure will eventually be applied to the wrong condition.
- Hard-coding the date type by product category. It is a per-product judgement made by the manufacturer, not a category rule.
- Assuming one jurisdiction's rules apply everywhere. The EU requires a date; the US largely does not.
- No minimum-life-on-receipt control. Short-dated stock is accepted at the dock and becomes somebody's write-off later.
The idea to walk away with
Shelf life is a duration on the item. Best before and use by are dates on the lot, and they are different kinds of statement: one about quality, one about safety, with the safety one carrying a legal prohibition in the EU once passed. Store the date and its type, branch your availability rules on the type, and name the column something other than expiry_date so nobody assumes.
Final thoughts
If you want a quick diagnostic on your own system, look at what happens when a lot's date passes. If the answer is the same regardless of whether the date was a best before or a use by, the distinction is not modelled, and you are either destroying good stock or shipping stock you should not. Both are worth finding before an auditor or a customer finds them.
For manufactured goods there is a prior question: what the finished goods date should be in the first place, which depends on the product's own established shelf life and, for some products but not all, on a configured cap at the shortest-dated ingredient. That calculation is in how to calculate finished goods expiry dates.
Modelling dated stock?
Independent advisory on item and lot data models, date-type handling, goods receipt controls and FEFO configuration. 22+ years across enterprise systems implementation. No vendor margins.
Book a conversationRelated reading: Expiry date management, FEFO vs FIFO vs LIFO, Batch vs lot vs serial number, Lot and batch tracking, Warehouse automation for pharmaceuticals.
Muhammad Abbas
CMMS / CAFM Manager & Independent Advisor · 22+ years across enterprise CMMS, EAM, CAFM and ERP implementations in utilities, oil and gas, manufacturing, government and facility operations.
Work with me