Skip to content
A shopper scans the barcode on a cereal box with a phone

How to read an EAN barcode and what it says about a product

Guides6 min read

What the numbers in an EAN barcode mean, how to check a code is valid and what you can (and cannot) learn about a product from it.

by Equipo de SuperLikeIt

Table of contents
  1. What an EAN is
  2. How the 13 digits are divided
  3. The check digit: how to know a code is valid
  4. What you can learn about a product from its code
  5. What a barcode does NOT say
  6. What happens if the code is not found
  7. Tips for scanning better
  8. Why this matters when comparing
  9. Summary
  10. Frequently asked questions

Short answer: the barcode on almost every supermarket product is an EAN-13, a 13-digit number that identifies one specific product in one specific size. It does not contain the name, the price or the expiry date: it is just a key used to find the product in a database. The last digit is a check digit that lets you test whether the number was written correctly.

What an EAN is

EAN originally stood for European Article Number, and today it belongs to the GTIN family of identifiers managed by GS1. The most common one in food is the EAN-13, with 13 digits. Small packs (a mint, a single chewing gum) sometimes carry an EAN-8, with 8 digits. There are also 12-digit UPC codes, mostly used in North America.

Each distinct product has its own code. The same yoghurt in a four-pack and in an eight-pack will carry different codes, because the product, as sold, is a different one.

How the 13 digits are divided

From left to right, an EAN-13 can be read in three blocks:

PartWhat it indicates
First digits (prefix)The GS1 organisation where the company registered the code
Middle digitsThe company that registered the code and the specific product
Last digitCheck digit to validate the number

One detail causes confusion: the prefix does not say where the product was made. It says in which country the GS1 organisation that registered the code is based. Codes starting with 84 belong to GS1 Spain, but a Spanish company can manufacture abroad, and a foreign one can register its code in Spain.

The check digit: how to know a code is valid

The last digit is calculated from the previous twelve. It exists to catch an error when scanning or typing. The method is:

  1. Number the first twelve digits from left to right.
  2. Add up the ones in odd positions (1st, 3rd, 5th...).
  3. Add up the ones in even positions (2nd, 4th, 6th...) and multiply the result by 3.
  4. Add both results.
  5. The check digit is what is missing to reach the next multiple of ten (if it is already a multiple of 10, it is 0).

Example with a number made up for the occasion, 841234567890:

  • Odd positions: 8 + 1 + 3 + 5 + 7 + 9 = 33.
  • Even positions: 4 + 2 + 4 + 6 + 8 + 0 = 24, and 24 × 3 = 72.
  • Total: 33 + 72 = 105. To reach 110 you need 5.
  • The full code would be 8412345678905.

If a code you type by hand does not satisfy this rule, one digit is wrong. It is the first thing checked before looking up a product.

What you can learn about a product from its code

On its own the code tells you nothing, but together with a product database it does. Depending on the database, you may find:

  • Name, brand and size.
  • A photo of the pack.
  • Ingredient list and other label data.
  • Product category.

One of the most widely used open sources is Open Food Facts, a collaborative database of products from all over the world.

What a barcode does NOT say

  • It does not say how it tastes. That is what reviews from people who tried it are for.
  • It does not say the price. Each shop sets the price and it changes over time and place.
  • It does not say the batch or the expiry date. Those are printed separately on the pack.
  • It does not guarantee the product page is correct. Collaborative databases can have mistakes or gaps.

What happens if the code is not found

It happens. The product may be new, local, or simply nobody has added it yet. In that case you can normally create the page by hand, with a name, brand and photo. In SuperLikeIt, if the EAN does not exist you can create it yourself, and it stays pending review before everyone can see it.

Tips for scanning better

  • Look for good light and avoid reflections on the plastic.
  • Hold the phone still for a few seconds, about 15 or 20 centimetres away.
  • If the code is on a curved surface (a can, a bottle), turn the pack until it is flat in front of the camera.
  • If it does not read, type the numbers by hand. The check digit warns you if you slip.

Why this matters when comparing

The code is what lets a review and a price noted by different people talk about the exact same product. That precision is the basis for being able to compare prices across supermarkets or see the rating of a store brand against the well-known one without mixing sizes.

Summary

  • An EAN-13 is a 13-digit key that identifies a product in its exact size.
  • The last digit validates the number.
  • The prefix says where the code was registered, not where it was made.
  • The code says nothing about taste or price: people provide that.

Frequently asked questions

What is the difference between EAN and GTIN?

GTIN is the general name of the identifier family. EAN-13 is a specific form of GTIN, with 13 digits, used on most food products.

Is a code starting with 84 a Spanish product?

Not necessarily. The 84 prefix means the code was registered with GS1 Spain. The product may have been made in another country.

Why does my phone not read the code?

Usually light, reflections, distance or a curved surface. Try moving, turning the pack or typing the number by hand.

Can two products share the same code?

They should not. Each code is meant to be unique. If you see two different pages with the same number, it is probably a database error.

Can a code be made up?

You can write a number with the right check digit, but that does not mean a product exists with it. A valid code is only well formed, not registered.

See what tastes good before you buy it

SuperLikeIt is free and has no ads. Scan the barcode, give your verdict and see what everyone else thinks.

Create my free account

Keep reading