What the number consists of
EAN-13 is a thirteen-digit GTIN. The first two or three digits mark the country or region of registration, then comes the company number issued by GS1, then the item number inside the company, and the last digit is the check digit.
The prefix does not say where the product was made: it shows where the number was registered. Chocolate made in one country can carry another country's prefix if the brand registered the code there.
The item number is unique inside the company. One GTIN means one product with one weight and one pack: change the volume or the flavour and you need a new code.
How the check digit is calculated
Take the first twelve digits and number them from the left. Digits in odd positions are multiplied by 1, in even positions by 3. Sum everything, drop the tens and top the remainder up to ten.
Example: 4 6 0 1 2 3 4 5 6 7 8 9. Weighted sum: 4 + 18 + 0 + 3 + 2 + 9 + 4 + 15 + 6 + 21 + 8 + 27 = 117. The last digit is 7, so the check digit is 3 — giving 4601234567893.
The check catches exactly the typos: swap one digit and the sum changes, so the code fails. A till or scanner will reject such a barcode.
Why a till complains
Three common reasons: a wrong check digit, a number not registered in the shop's database, or a code already used by another product. The first is visible at once — the scanner reports a format error.
The second is organisational: the code is fine but the product is missing from the catalogue. The third happens with manual generation, when a manufacturer invents numbers and ends up with duplicates.
That is why retail takes a GTIN from GS1: the number is then globally unique and does not have to be agreed with every shop separately.
Your own code without GS1
Internal tracking needs no registration. Prefixes 02 and 20–29 are reserved for internal use: such codes never reach retail, but work perfectly in a warehouse and during inventory.
If the product stays inside the company, any numbers will do — just compute the check digit and keep the codes from repeating. Qrix computes the check digit automatically.












