What the 13 digits mean
An EAN-13 barcode carries a GTIN-13, the number that identifies a trade item at the checkout. The first digits are a GS1 prefix, which shows which GS1 member organization issued the company number, not necessarily where the product was made. The company prefix and item reference together identify the product, and the last digit is a check digit.
The split between company prefix and item reference varies, because GS1 issues prefixes of different lengths depending on how many products a company needs to number.
- GS1 prefix: usually 3 digits, for example 978 or 979 for books (ISBN)
- Company number and item reference: 9 digits in total
- Check digit: 1 digit
- Symbol width: 95 modules plus quiet zones
How the check digit is calculated
The EAN-13 check digit uses a mod-10 calculation with alternating weights of 1 and 3. Multiply the first 12 digits by 1, 3, 1, 3 and so on from the left, add the results, and the check digit is the amount needed to reach the next multiple of 10.
For 950600013435, the weighted sum is 78, so the check digit is 2 and the full number is 9506000134352. A scanner recalculates this on every scan and rejects a read that does not match.
Structure and relatives
The symbol has start, center and end guard bars, with six digits on each side. The first digit is not drawn as bars of its own; it is encoded by the pattern of the left-hand six digits. EAN-8 is a shorter version for very small packs, and UPC-A is the 12-digit form used in the US and Canada. The symbology is specified in ISO/IEC 15420.