How is the EAN-13 check digit calculated
The last digit of EAN-13 is not a number filled in arbitrarily when assigning the code, but one calculated according to a fixed algorithmCheck digit. Its purpose is to let scanning devices immediately detect errors when reading.
Key points at a glance
- The check digit iscalculated, not assigned, and cannot be filled in arbitrarily
- Core of the algorithm: the first 12 digits are alternately weighted by "1, 3, 1, 3..." and summed, then take the complement of the result to 10
- Passing the check only meansthe number composition is valid, and does not mean the product is genuine
Taking 690123456789_ as an example
| Position | Digit | Weight | Product |
|---|---|---|---|
| 1 | 6 | 1 | 6 |
| 2 | 9 | 3 | 27 |
| 3 | 0 | 1 | 0 |
| … | … | … | … |
| Sum of products | 88 | ||
| Check digit: (10 − 88 mod 10) mod 10 | 2 | ||
So the complete number is 6901234567892. You can usebarcode verification toolto verify any number.
