How the EAN check digit works
The last digit of a retail barcode is not part of the product number. It is a checksum, calculated from the digits before it, and its whole job is to make a mistyped number fail immediately rather than silently point at the wrong product. If a tool tells you your number is invalid, this is almost always why — and the arithmetic is simple enough to do on paper.
The calculation, step by step
Take the digits without the check digit and read them from right to left. Multiply the first by 3, the second by 1, the third by 3, the fourth by 1, and so on, alternating. Add the results. The check digit is whatever you must add to reach the next multiple of ten — formally, ten minus the remainder of the sum divided by ten, and zero if that comes out as ten. The same routine produces the check digit for EAN-13, EAN-8, UPC-A and ITF-14; only the number of digits before it changes.
A worked example
Take the 12 digits 590123412345. Reading from the right: 5×3 + 4×1 + 3×3 + 2×1 + 1×3 + 4×1 + 3×3 + 2×1 + 1×3 + 0×1 + 9×3 + 5×1. That is 15 + 4 + 9 + 2 + 3 + 4 + 9 + 2 + 3 + 0 + 27 + 5, which totals 83. The next multiple of ten is 90, so the check digit is 7 and the full EAN-13 is 5901234123457. Enter the 12 digits in the app and it appends the 7 for you; enter all 13 and it verifies the last one instead.
Why your number comes back invalid
Four causes cover nearly everything. The count is wrong — EAN-13 wants 12 or 13 digits, and a 14-digit number is an ITF-14, not an EAN. There is a space, a dash or a letter in the string. Two digits are transposed, which the checksum is specifically designed to catch. Or the number was copied from a photo of a product and one digit was misread — 8 for 3 and 5 for 6 are the usual pair. Retyping from the printed number under the bars, not from the bars themselves, fixes most of them.
What the check digit does not tell you
It only proves the number is internally consistent. It says nothing about whether the number is yours, whether it is registered to any product, or whether it is already in use by someone else. A number can pass the checksum perfectly and still be another company's product. If you are putting a barcode on something you will sell through a shop, the number has to be issued to you — see the article on SKUs, barcodes and GTINs.
Frequently asked questions
What is a check digit?
The final digit of a retail barcode number, calculated from the digits before it so that a mistyped or misscanned number fails immediately instead of matching the wrong product.
How do I calculate an EAN-13 check digit by hand?
From the right, multiply the digits alternately by 3 and 1, add them up, and take whatever brings the total to the next multiple of ten.
Does UPC-A use the same formula?
Yes, and so do EAN-8 and ITF-14. Only the number of digits before the check digit differs.
Should I type 12 digits or 13?
Either. With 12 the app calculates the 13th; with 13 it checks the one you gave and tells you if it does not match.
My number passes the check but the product does not come up at the till.
The checksum only proves the number is well formed. Being recognised at a till requires the number to be registered to the product in the retailer's system, which is a separate matter entirely.
Can I invent a number that passes?
Arithmetically yes, and for internal stock that is fine. For anything sold through a retailer it is not, because the number would belong to someone else's range.
Labels that line up with the sheet you actually bought. Label Sheet lays out address labels, SKU barcodes and shipping labels at the exact millimetres of your sheet, then exports a PDF that prints at 100 per cent. Your data stays in the browser.
Make a label sheet in the browser