Lot Number & Lot Traceability: The Complete Guide
A lot number (also called batch number or LOT) is a unique identifier for a group of products manufactured under the same conditions. Lot traceability is the process by which those identifiers are captured and followed along the entire supply chain, from raw material to end customer. Together they form the backbone of quality assurance, recall management, and regulatory compliance in food, pharmaceuticals, cosmetics, and medical devices. This guide covers the definition, the GS1 format standard, upstream and downstream tracing, the industries where lot marking is legally mandatory (with primary regulatory sources), and how to automate everything with an ERP system.
Key takeaways
A unique identifier for a group of items produced under the same conditions. Also called batch number, or LOT for short.
The process that documents every movement of a lot from receiving through production, warehouse, and shipment, so any unit can be traced back to raw materials and forward to end customers.
Upstream tracing follows components back to suppliers. Downstream tracing follows finished goods forward to customers. Both are needed for a compliant recall.
A lot number identifies a group. A serial number identifies a single item. In pharma, both are used together.
No universal mandatory format. Common structure includes prefix, production date, location, sequential number, and optional quality indicator. The international standard is the GS1 Application Identifier (10), up to 20 alphanumeric characters.
Food (EU Regulation 178/2002 Article 18, FIR 1169/2011), pharmaceuticals (FMD 2011/62/EU), medical devices (MDR 2017/745), cosmetics (Cosmetics Regulation 1223/2009). Comparable rules in the US via FDA (21 CFR Part 211 pharma, 21 CFR Part 820 medical devices, FSMA for food).
What is a lot number? Definition and difference from a serial number
A lot number is a unique identifier for a group of identical products that were manufactured, processed, or packaged under the same conditions. Every unit in the lot shares the same number. It enables traceability from raw material to end customer. On internationally distributed products, it often appears with the prefix "LOT."
A lot (also called a batch) is the quantity of product produced in a single production run, on a single day, or from a defined raw-material blend. Think of a lot of cookies baked from the same dough, or a lot of medication produced in a single manufacturing run. Every unit shares the same lot number.
The lot number tells you:
Production site: Where was the lot produced?
Production date: When was it manufactured?
Production conditions: Temperature, line, shift, equipment
Quality checks: Which tests were performed and passed?
Lot number vs. serial number: the critical distinction
The most important distinction is from a serial number. A lot number identifies an entire product group. A serial number identifies each individual item as unique.
Attribute | Lot number | Serial number |
Identifies | An entire production lot (group) | A single, individual item |
Purpose | Group traceability, quality control | Individual tracking (warranty, anti-theft) |
Common use | Food, pharmaceuticals, cosmetics | Electronics, vehicles, high-value machinery |
GS1 Application Identifier | AI (10), up to 20 alphanumeric characters | AI (21), up to 20 alphanumeric characters |
In pharmaceuticals the two are combined: each package carries both a lot number and a unique per-unit serial number (serialization under the Falsified Medicines Directive, 2011/62/EU).
What is lot traceability? Process, upstream, and downstream
Lot traceability is the process of following a lot's path from raw material to end customer using its lot number as the anchor. It works in two directions: upstream tracing back to suppliers and inputs, downstream tracing forward to customers. Both are required for a compliant, targeted recall.
Where the lot number is a static identifier, lot traceability is the dynamic process. Every time a lot moves into the warehouse, into production, into a picking bin, into a shipment, that movement gets logged against the lot number. That log is what makes a targeted recall possible.
Upstream tracing (backward from finished good)
Upstream tracing follows the supply chain backward. You can determine which raw materials or components from which suppliers were used in a specific finished-good lot. That's what lets you find the root cause when a quality problem surfaces, such as a contaminated ingredient in a food product or a faulty component in a device.
Downstream tracing (forward from finished good)
Downstream tracing follows the chain forward. You know exactly which customers, distributors, or retailers received a given lot. When a recall becomes necessary, you can pull only the affected units instead of every product in circulation. That's the difference between a targeted recall costing tens of thousands and a market-wide recall costing millions.
The "one step back, one step forward" principle
The EU General Food Law (Regulation 178/2002, Article 18) defines the minimum standard as "one step back, one step forward": every food business must know who supplied them and to whom they delivered. Internal traceability inside your own operations goes beyond that legal minimum but is the industry-standard practice for anyone serious about quality.
Why does the lot number matter? Five core benefits
The lot number is the backbone of quality assurance. It enables end-to-end traceability, targeted quality control, precise recalls, regulatory compliance, and stock rotation by FIFO or FEFO. Without it, none of these are possible at any meaningful scale in food, pharma, cosmetics, or medical devices.
1. End-to-end traceability
You can trace, at any moment, which raw materials went into which lot, when and where it was produced, and which customers received it. That's the entity you sell into audits, retailer certifications, and quality reviews.
2. Targeted quality control
When a quality check surfaces a defect, you can immediately identify the affected lot and pull it from stock without inspecting your entire inventory. Same principle for supplier-side problems: if an ingredient supplier reports a contamination, you know exactly which of your finished lots used that ingredient.
3. Precise product recalls
Instead of pulling every product on the market, you limit the recall to the affected lots. The FDA's recall guidance and equivalent EU frameworks both operate at lot-level, which is why the lot number is legally the pivot point of any recall action.
4. Regulatory compliance
In food, pharma, medical devices, and cosmetics, lot marking is legally mandatory (details in Section 7). The lot number is your proof of compliance during audits.
5. Optimized inventory management
Combined with best-before or expiry dates, the lot number lets you drive stock rotation properly. FIFO (first in, first out) keeps stock moving in receiving order. FEFO (first expired, first out) prioritizes lots closest to expiry — critical in food and pharma. Both minimize losses from expiration and optimize carrying costs.
Assign lot numbers automatically and trace them end-to-end
With Xentral you generate lots at receiving or production completion, link them to expiry dates and raw-material lots, and drive FIFO/FEFO picking automatically. No spreadsheet reconciliation, no gaps in the chain.
Which industries require lot numbers by law?
Lot marking is legally required in food, pharmaceuticals, medical devices, cosmetics, and parts of automotive. In the EU the legal basis includes Regulation 178/2002 (food), 1169/2011 (food labeling), 1223/2009 (cosmetics), 2017/745 (medical devices), and Directive 2011/62/EU (pharmaceuticals). Similar rules apply in the US via FDA regulations.
Food industry
The primary EU basis is Regulation (EC) No 178/2002 (General Food Law), Article 18: traceability of food, feed, food-producing animals, and related substances must be established at all stages of production, processing, and distribution. The Implementing Regulation (EU) No 931/2011 adds specific traceability requirements for food of animal origin. The lot-marking obligation on the packaging itself comes from the Food Information to Consumers Regulation (EU) 1169/2011, Article 25. In the US, the FDA's Food Safety Modernization Act (FSMA) and 21 CFR Part 1 impose comparable traceability requirements.
Pharmaceuticals
For medicinal products, the Falsified Medicines Directive 2011/62/EU (FMD) applies, implemented through Delegated Regulation (EU) 2016/161. Every prescription drug package must carry a lot number, expiry date, and unique serial number encoded in a 2D Data Matrix. European Medicines Agency (EMA) guidelines and Good Manufacturing Practice (GMP) rules add further requirements. In the US, the Drug Supply Chain Security Act (DSCSA) and FDA 21 CFR Part 211 cover the same ground.
Medical devices
The Medical Device Regulation (EU) 2017/745 (MDR) mandates UDI (Unique Device Identification): a Basic UDI-DI combined with a Production Identifier that includes lot number and any serial number. The FDA's UDI Rule (21 CFR Part 830) mirrors this in the US market.
Cosmetics
The EU Cosmetics Regulation 1223/2009, Article 19 requires a lot number on packaging. Lot marking helps identify contaminated products and enables audits of the manufacturing process.
Automotive industry
No single EU-wide regulation, but lot traceability is embedded through standards like IATF 16949. Safety-critical components must be traceable by lot so faulty parts can be recalled precisely, think airbag deployment mechanisms or brake components.
Other industries and standards
Lot marking is required or de facto standard in feed, toys, chemicals, and aerospace. ISO 9001 recommends lot traceability across quality management systems generally.
How is a lot number structured? Format, example, and the GS1 standard
There's no universal mandatory format. Common components are a prefix, production date, location, sequential number, and optional quality indicator. The international standard is the GS1 Application Identifier (10): up to 20 alphanumeric characters, encoded directly after the "10" prefix in a GS1-128 or DataMatrix barcode.
Typical components of a lot number
Prefix: Marker for the type of lot or product (LOT, BATCH, or a product-specific code)
Production date or week: YYMMDD or YYYY-Wxx format
Location: Site, production line, or machine identifier
Lot ID: Sequential number for unique identification
Suffix: Additional metadata like quality-check status, shift, or reprocess flag
Real-world example
LOT-2026-W42-HH-001-Q
LOT = lot number marker
2026 = production year
W42 = calendar week 42
HH = Hamburg location
001 = sequential lot number
Q = quality check passed (optional)
GS1 standard for lot numbers
For internationally consistent marking, use the GS1 Application Identifier (10), or AI (10), for BATCH/LOT. It's encoded together with the GTIN (Global Trade Item Number, AI 01) in a GS1-128 barcode or GS1 DataMatrix. Format: up to 20 alphanumeric characters, directly after the "10" prefix. Standard combinations:
(01) GTIN (14 digits) – what the product is
(10) BATCH/LOT – which lot
(17) USE BY / EXPIRY – expiry date (YYMMDD)
(21) SERIAL – optional serial number for item-level ID
Major grocery chains and marketplaces almost always require GS1-compliant labels. It enables scanning, cross-docking, and traceability without manual data entry at each handoff.
Why a clean format matters
A structured, consistent numbering system makes lots immediately readable. During a recall or audit request, you don't need a secondary lookup because production location, timing, and quality status are visible right in the number. For spreadsheet-based systems, that's mandatory. In an ERP, the format matters less because metadata is linked in the database anyway.
How are lot numbers created and assigned?
Lot numbers are assigned either manually (spreadsheet, hand-entered at receiving or production) or automatically (ERP system, generated at production completion or receiving). Manual assignment is error-prone and doesn't scale. Modern operations let their ERP generate lot numbers in real time and link them to every relevant process step.
Manual assignment: slow and error-prone
With manual assignment, someone types the lot number into a spreadsheet at production or receiving. This is highly error-prone, slow, and makes true end-to-end traceability nearly impossible once SKU count or volume grows. A single typo can break the trace chain for an entire lot.
Automated assignment: the modern standard
An ERP system assigns the lot number automatically at receiving, production completion, or picking. The system links it directly to:
Raw-material lots (upstream link)
Production date, line, and conditions
Best-before or expiry date
Quality-check results
Order and customer at shipment (downstream link)
Assignment happens in real time. No lot ever sits in the system without an identifier.
Modern technologies for lot marking and tracking
Lots are marked on products or packaging using barcodes (GS1-128, DataMatrix), QR codes, or RFID tags. GS1-128 dominates grocery retail and logistics. DataMatrix is standard in pharma and medical devices. RFID is common in automated warehouses and apparel. Serialization adds per-unit uniqueness on top of the lot number.
Barcodes (GS1-128, GS1 DataMatrix)
The classic. GS1-128 can carry up to 48 characters and encodes GTIN (AI 01), lot number (AI 10), best-before date (AI 15), and serial number (AI 21) in the same barcode. Ideal for food, beverage, and consumer-goods supply chains where retail partners expect GS1 compatibility. The GS1-128 standard is used worldwide.
QR codes and GS1 DataMatrix
QR codes hold more information than classic barcodes and are readable by smartphone. GS1 DataMatrix is used in pharma for FMD serialization and suits track-and-trace systems with end-consumer interaction (e.g., product authenticity checks).
RFID
Radio-Frequency Identification enables contactless reading without line of sight, and multiple tags simultaneously. Common in automated warehouses, apparel (Zara, Decathlon), and safety-critical components.
Serialization
In pharma, each package carries a unique serial number on top of the lot number (FMD requirement). This enables item-level track-and-trace and protects against drug counterfeiting. Serialization is increasingly common in premium goods and regulated segments outside pharma too.
From spreadsheets to ERP: the technical implementation
Manual lot tracking in spreadsheets breaks down once you handle more than ~20 lots in parallel or work with multiple suppliers. An ERP system integrates lot tracking natively into every process – receiving, production, warehouse, and shipping so lot data flows automatically and one source of truth replaces the reconciliation work.
An ERP-native workflow looks like this:
Receiving
When a supplier delivery arrives, the raw material or product lot is captured directly in the system, typically via barcode scan or RFID tag. Supplier lot, expiry date, and quantity flow into the master record automatically.
Production and warehouse
When you use raw materials for your own production, the system links component lots to the finished-good lot. Inventory stays current including expiry dates, maintenance intervals, and any other lot-related metadata.
Sales and shipping
Every order automatically documents which product lot went to which customer or retailer. The picking process pulls the correct lots per FIFO or FEFO logic without operator judgment. Traceability records are complete without any manual step.
A system like Xentral acts as the central nervous system for this. It's not just a lot-tracking tool. It connects production, warehouse management, and multi-channel sales into one dataset. Instead of isolated data in disconnected tools, you have one truth per lot, per process, per product.
Industry-specific challenges
Food and beverage: expiry dates and certificates
In the food industry, best-before dates (BBD) and expiry dates are as critical as the lot number itself. Grocery chains — especially the large ones — impose strict remaining-shelf-life requirements at delivery. If the BBD is too close, the delivery gets rejected. Manual FEFO management is a huge error source here. On top of that, certificates like organic certification have to be tied to each lot for audit purposes.
Pharmaceuticals and cosmetics: safety-first traceability
In pharmaceuticals and cosmetics, legal requirements are stricter still. This isn't about quality; it's about human safety. Every single component of a medication or cream must be traceable end-to-end. A contaminated ingredient or a manufacturing defect can have serious consequences.
Serialization (assigning a unique serial number per package) is standard practice here. An unbroken digital record from raw-material receiving through production to delivery at the pharmacy or retailer isn't optional; it's an existential requirement. Companies in this space benefit from integrated systems that manage lot numbers alongside validation protocols, audit trails, and GMP-compliant documentation in one place.
Industrial and automotive: lots plus serials
In sectors like automotive [FLAG: verify EN URL] and aerospace, quality standards like IATF 16949 or AS9100 mandate lot traceability. For safety-critical components, this often extends to per-unit serialization: not just which lot a part came from, but which specific bolt or bearing.
Real-world examples from the food industry
Two Xentral customers illustrate what lot traceability looks like in a growing food operation.
3Bears – transparency across porridge production
As a producer of more than 3.5 million porridge packs per year, 3Bears needs precise traceability from raw material to delivery. With Xentral they document lot numbers and best-before dates along the entire supply chain and can execute targeted recalls or quality checks whenever needed. The combination of production, warehouse, and shipping in one system is what makes that possible at their scale. Read the 3Bears case study
nucao – safety and efficiency in organic chocolate distribution
nucao distributes organic-certified chocolate products and needs reliable lot traceability for retail partners like the German drugstore chain dm. Xentral gives them end-to-end documentation of production, warehouse movement, and delivery — including serial numbers and BBD management. That's how nucao meets both regulatory requirements and internal quality standards. Read the nucao case study
Lot traceability for your products, too?
Food operators are already running automated traceability with Xentral. With an integrated ERP you control every lot, every BBD, and every delivery.
How does an ERP system help with lot management?
An ERP system assigns lot numbers automatically at receiving or production, links them to expiry dates and raw-material lots, and documents every warehouse move, pick, and shipment. Spreadsheets get replaced by a single source of truth that surfaces every affected lot and recipient within seconds if a recall breaks.
With Xentral, lot management sits in one place:
Item master configuration: You define per SKU whether it requires a lot number or a serial number. The system enforces capture automatically.
Automated capture: At receiving or production completion, the system prompts for the lot number and best-before date.
End-to-end linking: That information travels with every warehouse move, picking, and shipment.
FIFO and FEFO control: During picking, the system automatically suggests the oldest or first-to-expire lots.
Recall management: If a problem surfaces, you identify every affected lot and every recipient in seconds.
In food and beverage in particular, the combined management of lot numbers and best-before dates is critical for compliance and to prevent food waste. See how you can set up warehouse management with Xentral and optimize your production processes.
Bottom line: no lot number, no control
The lot number is the foundation of every traceability system, every targeted quality check, and every precise recall. The international GS1 standard AI (10) makes it readable across retail chains and country borders. Lot traceability — the process that documents every movement of that lot — is what turns a static identifier into operational power.
Manual management in spreadsheets is a relic. It doesn't survive audits, it doesn't scale, and in a recall situation it fails at the worst possible moment. Modern systems like Xentral automate lot management, minimize errors, and give you full control back. That's how you secure compliance and optimize your processes in warehouse management and production. Whether you produce food, pharmaceuticals, cosmetics, or industrial components, the foundation is the same: assign, link, and trace every lot from receiving to delivery.
Maximum product safety, minimum manual effort.
Generate lot numbers, secure traceability, and automate your warehouse in one system.
Frequently asked questions
You might also like
Food
/
Multichannel
Selling your product in the supermarket: how to make the shelves of Safeway, Walmart, Tesco, etc.
For companies eager to make the move from e-commerce to brick-and-mortar retailing, having products on supermarket shelves is the ultimate accolade.
Warehouse
/
Master Data
/
e-Commerce
/
Returns
What are the real costs of bad master data: returns, errors, downtime
Here's a look at the damage bad product data does most often, which data fields cause the most trouble, and how a properly set up ERP data model prevents it.