Qrix There is no square. There is code.

EAN-13 explained: what the digits mean and the check digit

The thirteen digits under the bars are not random. They carry the registration country, the manufacturer, the item and a check that catches typos.

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.

The short answers

Where do I get a GTIN for a product?

From GS1: the organisation issues the prefix and keeps the registry. In Russia that is GS1 Russia, elsewhere the local GS1 member.

Can I compute the check digit by hand?

Yes, with the 1 and 3 weights: the sum of digits in odd positions plus three times the sum in even positions, then top up to ten. Qrix does it automatically.

What if the check digit does not match?

The scanner reports a format error and the till will not accept the product. The code has to be reprinted: the check is built into the format.

Is EAN-13 mandatory in retail?

For selling in shops and for product marking, yes — a GTIN is used. For internal needs you can print your own codes in the reserved ranges.

More guides