Check Digit Calculator
Choose a barcode type, enter the body digits and we compute the GS1 modulo-10 check digit step by step.
How to use in 3 steps
- 1
Choose a type
Pick EAN-13, EAN-8, UPC-A, GTIN-14 or ITF-14.
- 2
Enter body digits
Type all digits excluding the check digit.
- 3
See the calculation
We show the weighted sum and the resulting check digit step by step.
Example input / output
Input
Type: EAN-13, Body: 400638133393
Output
Sum 58 → check digit 2 → 4006381333932
Technical notes
The GS1 check digit works with a single rule: excluding the check digit, digits are taken right to left and multiplied by alternating weights 3 and 1 (the rightmost body digit gets 3). The products are summed and the check digit = (10 − (sum mod 10)) mod 10.
This method is identical for EAN-13, EAN-8, UPC-A (GTIN-12), GTIN-14 and ITF-14; only the digit count changes. The weight alignment depends on starting from the right, not on the digit count, so it works consistently across all lengths.
The check digit's core purpose is to catch keying/reading errors: mistyping a single digit almost always yields a different check digit and the error is caught immediately. However, some errors — such as swapping two digits — may slip past modulo-10.
A correct check digit only shows the number is internally consistent; it does not prove the number is registered to a real product. To validate a single number by type use the GTIN validator, and for the concept see what is a check digit.
Frequently asked questions
The GS1 standard defines these weights for modulo-10. Alternating 3 and 1 was chosen to catch single-digit errors and most adjacent transpositions.