Finding an expiry date from barcode: Why it’s harder than you think

Finding an expiry date from barcode: Why it’s harder than you think

You’re standing in the pantry, squinting at a faded tin of chickpeas or maybe a bottle of expensive face serum. You see the black and white stripes. You see the numbers. But for the life of you, you can’t find a stamped date anywhere. Naturally, you wonder if you can just get the expiry date from barcode scanners on your phone. It’s a logical leap. We use barcodes to pay for groceries, check into flights, and track packages across the globe. Why wouldn't that little block of lines hold the most important piece of information—whether this food is going to make you sick?

The short answer is a bit of a letdown. Standard barcodes don't actually contain expiration dates.

Wait. Don’t close the tab yet.

While that dusty old UPC (Universal Product Code) on your cereal box is "dumb"—meaning it only identifies the product type and the manufacturer—the world of logistics is changing fast. We are currently in the middle of a massive global shift toward 2D barcodes and GS1 Digital Link standards that will eventually make "dumb" barcodes a thing of the past. But right now, if you're looking at a standard 12-digit barcode on a bag of chips, that number is the same for every single bag of those chips ever made. It doesn't know when its specific batch was fried or bagged.

The technical reality of the UPC

Most people think of a barcode as a digital file. It’s not. It’s essentially a font. A standard UPC-A barcode, the kind you see on almost every retail product in North America, represents a 12-digit number. That's it. No more, no less.

The first few digits identify the company (the GS1 Company Prefix). The next set of digits is the item reference number assigned by that company. The final digit is a "check digit" used by the scanner to make sure it read the others correctly. Honestly, it’s a very 1970s piece of technology. Because the code is printed on the packaging during the mass-printing phase—long before the food is actually put inside—it is physically impossible for that specific barcode to know the expiry date of the contents.

Think about it. A company prints ten million soda labels in January. They use those labels on bottles filled in February, March, and April. Each of those bottles has a different shelf life, but they all share the exact same printed barcode. To include an expiry date, the manufacturer would have to change the printing plate for every single batch. That’s why you see the "Best By" date jetted onto the plastic or glass with an inkjet printer later in the process. It’s a separate step.

When you actually CAN get an expiry date from barcode data

Now, if you work in a warehouse or a high-end hospital, you’re probably calling me a liar. You’ve seen it happen. You’re right.

There is a specific type of barcode called a GS1-128 or a DataBar. These are often used on "variable weight" items. Think about the shrink-wrapped steak at the grocery store. That barcode is longer and denser. It’s fancy. It uses things called Application Identifiers (AIs). In these strings of numbers, the prefix "17" tells the computer that the following six digits are the expiration date in a YYMMDD format.

Why your phone app says it can do it

You’ll find dozens of apps on the App Store or Google Play claiming they can track your pantry by scanning barcodes. Most of these are semi-automated databases. When you scan a can of soup, the app looks up the UPC and says, "Oh, that’s Campbell’s Tomato Soup." It then looks at its own internal database to see what the average shelf life for that product is. It might suggest an expiry date of two years from today.

It’s a guess. A total "ish" situation. It isn't actually reading a date from the lines; it’s making an educated estimate based on the product type. If that soup has been sitting in a local corner store for eighteen months before you bought it, the app’s "prediction" will be dangerously wrong.

The Sunrise 2027 initiative

If you’re frustrated by this, you aren't alone. Retailers are losing billions of dollars because they can't track dates automatically. Currently, a grocery store employee has to walk down the aisle and manually check the "Sell By" dates on every yogurt cup. It’s incredibly inefficient.

This is why the industry is moving toward "Sunrise 2027." This is a global project led by GS1 (the organization that manages barcode standards) to transition retail point-of-sale systems to accept 2D barcodes, like QR codes or Data Matrix codes.

Unlike the old-school stripes, these 2D codes can hold a massive amount of data. They can include:

  • The Batch or Lot number
  • The Serial number
  • The Expiry date
  • A link to the brand's website

Once this transition is complete, the register will actually beep and block a sale if the milk you're trying to buy is past its date. It’s a huge win for food safety. But we aren't quite there yet for every item in your fridge.

Decoding the "hidden" codes on your products

Sometimes people confuse the barcode with the batch code. If you look at a bottle of shampoo or a box of medication, you might see a weird string of letters and numbers stamped near the barcode—something like "L2034B."

This isn't the expiry date, but it is the key to it. This is the Lot Code. Manufacturers use this to track exactly which vat of product a bottle came from. If there is a recall, they don't recall every bottle; they recall "Lot L2034B." You can often go to a manufacturer’s website, or sites like CheckFresh, and plug in that lot code. The site will then tell you exactly when that specific batch was manufactured and how long the shelf life typically is.

It’s a bit of a chore, honestly. But for expensive skincare or perfumes that don't have a clear date, it’s the only way to be sure you aren't putting oxidized chemicals on your face.

Cosmetics and the PAO symbol

While we’re talking about dates that aren't in the barcode, we have to mention the PAO. If you look at the back of a lotion bottle, you’ll see a little icon that looks like an open jar with a number followed by an "M" (like 6M, 12M, or 24M).

This is the "Period After Opening."

Even if a barcode could tell you when the product was made, it can't tell you when you cracked the seal. The moment oxygen hits that cream, the clock starts ticking. A 12M symbol means you should toss it one year after you first used it, regardless of what any barcode or batch code says. This is a huge point of confusion for people trying to use technology to manage their "use by" dates.

How to actually manage expiry dates today

Since we can't rely on the stripes just yet, what actually works? Relying on a barcode scanner for safety is, frankly, a bad idea. Technology is a tool, but it's not a substitute for your senses or the physical stamps on the packaging.

  1. The Sharpie Method: Honestly, this is the most "pro" move. When you buy something, write the date you bought it or the expiry date clearly on the lid with a permanent marker. It takes two seconds and saves you from the "is this still good?" dance later.
  2. First In, First Out (FIFO): This is the golden rule of professional kitchens. When you come home from the store, don't put the new milk in the front. Push the old milk forward and put the new one in the back.
  3. Use OCR Apps, not Barcode Apps: If you want to use your phone, look for apps that use Optical Character Recognition (OCR). Instead of scanning the barcode, these apps "read" the actual printed text of the date using your camera. They are much more accurate because they are looking at the real date, not a database guess.
  4. Know the difference in terminology: "Use By" is a safety date (mostly for meat and dairy). "Best Before" is a quality date (the crackers might be soft, but they won't kill you). "Sell By" is for the store’s inventory management.

Looking ahead to a smarter pantry

We are hovering on the edge of a world where your fridge will scan a QR code on a carton of eggs and send a notification to your watch that they expire in two days. The technology exists. The standards are being written. The "expiry date from barcode" dream is becoming a reality through GS1 Digital Link.

💡 You might also like: Dell 34 Inch Curved Display: Why Your Desk Setup Still Feels Cramped

Until every manufacturer adopts these 2D codes, don't trust a barcode scanning app to tell you if the tuna is safe. Look for the inkjet stamp. Trust your nose. Check for bulging cans.

The most "expert" advice I can give you is this: technology is great for tracking what you have, but it’s currently pretty terrible at telling you when that stuff goes bad. The barcode on your milk is the same as the barcode on mine, even if mine has been sitting in a hot car for three hours and yours is fresh from the cow.

Next Steps for You:
Check your most-used pantry items for a 2D Data Matrix code (it looks like a square version of a QR code). If you find one, try scanning it with a standard smartphone camera. You might be surprised to find it leads to a detailed landing page with batch-specific information. For everything else, keep that Sharpie handy in the kitchen drawer and trust the physical stamps over the digital lines.