How the GS1 check digit works
EAN-13, EAN-8, UPC-A and ITF-14 all use the same GS1 “mod 10” method. Starting from the digit next to the check digit and moving left, multiply the digits alternately by 3 and 1. Add up the results, then find the amount needed to reach the next multiple of 10. That amount (0–9) is the check digit.
The weighting is always anchored at the right-hand end, which is why the same rule works for 8, 12, 13 and 14 digits: the digit immediately before the check digit is always multiplied by 3.
Why barcodes have check digits
The check digit lets a scanner or system catch mistakes. The GS1 method detects every error where a single digit is wrong, and most cases where two neighbouring digits are swapped. The exception is a swap of two digits that differ by 5 (such as 1 and 6), which produces the same total.
EAN-13 example: 4006381333931
Twelve digits, then the check digit. Weights alternate 1, 3, 1, 3… from the left, so the digit next to the check digit is multiplied by 3.
| Digit | 4 | 0 | 0 | 6 | 3 | 8 | 1 | 3 | 3 | 3 | 9 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| × Weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| = Product | 4 | 0 | 0 | 18 | 3 | 24 | 1 | 9 | 3 | 9 | 9 | 9 |
- 1. Add the products: 4 + 0 + 0 + 18 + 3 + 24 + 1 + 9 + 3 + 9 + 9 + 9 = 89
- 2. Round up to a multiple of 10 (unchanged if it already is one): 90
- 3. Subtract: 90 − 89 = 1. The check digit is 1.
EAN-8 example: 96385074
Seven digits. Because the count is odd, the weights start with 3 on the left: 3, 1, 3, 1, 3, 1, 3.
| Digit | 9 | 6 | 3 | 8 | 5 | 0 | 7 |
|---|---|---|---|---|---|---|---|
| × Weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| = Product | 27 | 6 | 9 | 8 | 15 | 0 | 21 |
- 1. Add the products: 27 + 6 + 9 + 8 + 15 + 0 + 21 = 86
- 2. Round up to a multiple of 10 (unchanged if it already is one): 90
- 3. Subtract: 90 − 86 = 4. The check digit is 4.
UPC-A example: 036000291452
Eleven digits, weighted 3, 1, 3, 1… from the left. It's the same calculation as EAN-13 with a leading 0, which is why UPC-A and EAN-13 check digits always agree.
| Digit | 0 | 3 | 6 | 0 | 0 | 0 | 2 | 9 | 1 | 4 | 5 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| × Weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| = Product | 0 | 3 | 18 | 0 | 0 | 0 | 6 | 9 | 3 | 4 | 15 |
- 1. Add the products: 0 + 3 + 18 + 0 + 0 + 0 + 6 + 9 + 3 + 4 + 15 = 58
- 2. Round up to a multiple of 10 (unchanged if it already is one): 60
- 3. Subtract: 60 − 58 = 2. The check digit is 2.
ITF-14 example: 15400141288763
Thirteen digits, weighted 3, 1, 3… from the left. The first digit is the packaging indicator and is included in the calculation.
| Digit | 1 | 5 | 4 | 0 | 0 | 1 | 4 | 1 | 2 | 8 | 8 | 7 | 6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| × Weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| = Product | 3 | 5 | 12 | 0 | 0 | 1 | 12 | 1 | 6 | 8 | 24 | 7 | 18 |
- 1. Add the products: 3 + 5 + 12 + 0 + 0 + 1 + 12 + 1 + 6 + 8 + 24 + 7 + 18 = 97
- 2. Round up to a multiple of 10 (unchanged if it already is one): 100
- 3. Subtract: 100 − 97 = 3. The check digit is 3.
UPC-E is different
A UPC-E check digit isn't calculated from its own 8 digits. First expand it to the full UPC-A number, then apply the method above. For example, UPC-E 0425261 expands to UPC-A 04210000526, whose check digit is 4, so the complete UPC-E is 04252614. The EAN/UPC Validator includes a converter that does this for you.