Design a lot-coding scheme that ties every unit you make back to exactly one lot — and learn why the code that traces your product is a different thing from the date you print for the shopper.
Chef Diego runs a real food plant. If this page didn't get you there, tell us — a person reads every message.
After this lesson you can lay out a lot code that ties any unit you ship back to exactly one lot, decide how big each lot should be, and keep that code separate from the date you print for the shopper — two jobs that new operations routinely run together and later regret.
What a lot actually is
A lot is a decision before it is a string of characters. FDA defines it plainly in its preventive-controls rule, 21 CFR 117.3: a lot is . The word that carries the weight there is your. Nobody hands you a lot; you draw its boundary.
The way to draw it is to ask what you would have to pull. A lot is the smallest group of product you can point to and say "if any single unit in here is bad, this is the set that comes back." Draw the boundary too wide and every recall is wider than the actual problem. Draw it as tight as you can afford to track, and a recall stays small.
Say you run three batches of hot sauce on one line in a day, 400 bottles each. Code all three as one lot — the day — and a problem in the second batch forces all 1,200 bottles back. Code each batch as its own lot, and you pull 400. The trade is real: three lots is three times the coding and record-keeping of one. But the lot is the unit of a recall, so you are really deciding how much product a single mistake can cost you.
Design the code so it is unique and readable
Once you know how big a lot is, the code just has to name it without collisions. A workable lot code is built from a few parts:
1
When it was made
A pack date — a calendar date, or a Julian day (001 through 366) if you want it compact. This is the backbone most schemes hang on.
2
Where it was made
A line, room, or site marker, so two lines running the same product on the same day never share a code.
3
Which run
A shift letter or a sequence number that separates one batch from the next within a day.
Two rules keep the scheme honest. First, no two different lots can ever produce the same code — walk your own format and try to make a collision; if you can, add the part that breaks it. Second, the code has to survive the plant: permanently applied and legible, on the unit and on the case, because a code that smears off a carton is no code at all.
You do not have to invent the format from nothing. For low-acid canned foods, the law already spells one out: 21 CFR 113.60(c) requires every hermetically sealed container to carry a code, permanently visible to the naked eye, that identifies the establishment where it was packed, the product inside, and the year, day, and period it was packed. Even if you never touch a retort, that list — plant, product, date, run — is a sound template for a code that actually traces.
The lot code is not the date on the label
Here is the confusion that costs people: the code that traces your product and the date printed for the shopper are two different marks, doing two different jobs, for two different readers. USDA's product-dating guidance names the split directly.
Closed, or coded, dating is — your lot code by another name. It exists for you and, if it comes to it, for a traceback, not for the customer to read.
Open dating is — the freshness mark. On most foods it speaks to quality, not safety.
Two facts about that consumer date keep operators out of trouble. Most packaged foods are not required by federal law to carry a date at all — the single exception FDA names is infant formula, which must carry a "Use-By" date. And except for that infant-formula date, these are quality indicators, not safety deadlines: they tell a shopper when the product is at its best, not the moment it becomes unsafe.
Don't let one mark do the other's job
A consumer "Best if Used By" date is not a lot code — it cannot tell you which batch a unit came from — and a lot code is not a freshness promise. Keep both marks, and confirm your consumer date format against FDA and USDA guidance for your specific product rather than copying another label.
Where the code gets applied
A lot code only traces if it is present at every stage, not just stamped on the finished case. Three places have to carry it:
Raw receipt. When material arrives, capture the supplier's own lot against your record of it. That is the backward end of your one-up, one-down — the one-up-one-down lesson is the prerequisite here for a reason.
The finished unit. Every unit and case leaves with its finished lot code applied, so a trace forward to the customer is a lookup, not an investigation.
Software built for food carries the lot code across those stages as a link between records rather than a value you retype at each step; Bettr Manager, the platform this site is part of, works that way, tying the supplier lot captured at receipt through the batch to the finished lot and its shipments. A disciplined paper system with real cross-references clears the same bar — it just takes far more hand-work to keep the links honest. For one concrete way to record a supplier lot at the first stage, the docs walkthrough on receiving a purchase order shows how to capture it so it stays connected downstream.
When the law names your lot code
For foods on the , your lot code stops being purely your own convention and becomes a defined, regulated object. Under FDA's Food Traceability Rule (FSMA Section 204), your lot code becomes something the rule defines and names: a (21 CFR 1.1310).
The rule is precise about when you assign one. Under 21 CFR 1.1320, you create a traceability lot code at only three moments: when you initially pack a raw agricultural commodity, when you do the first land-based receiving of a food from a fishing vessel, or when you transform a food into something new. Just as important is when you do not: you must not mint a new code simply because you shipped or moved the food. The code rides along unchanged so the chain stays unbroken from one handler to the next.
That compliance date has already moved once — from January 20, 2026, to July 20, 2028, with FDA also signaling that routine inspections will not begin until 2027. Because these dates shift, confirm the current one on FDA's Food Traceability Rule page rather than trusting any date printed here (verified July 2026). Whether the rule reaches you depends on whether your product is on the list — the lessons on what FSMA 204 asks you to record and whether you are on the list walk through both.
A code is only useful if you pick by it
A lot code that ties every unit to one lot is the foundation. But knowing which lot a bottle belongs to does not tell your picker which bottle to grab first. Pair the lot with its expiry date and you can pull stock by which lot expires soonest, not merely by which lot came in first — the difference between first-in-first-out and first-expiry-first-out. That is the next thing to get right.