GTIN, UPC & EAN Check Digit Calculator
Enter your digits and see exactly how the check digit is calculated, step by step. Works for UPC-A, EAN-13, EAN-8, and every GTIN format.
Works for UPC-A, EAN-13, EAN-8, and every GTIN format. They all use the same GS1 algorithm.
How the GS1 check digit algorithm works
Every GTIN ends with a single check digit. This digit catches scanning and data entry errors by validating the rest of the number. The same algorithm is used across all GTIN formats (GTIN-8, GTIN-12, GTIN-13, GTIN-14), UPC, EAN, and ISBN-13.
The algorithm
- Pad the digits. Zero-pad to 13 positions (the standard GTIN-14 payload length).
- Assign weights. Starting from the rightmost digit, alternate between multiplying by 3 and 1. The rightmost payload digit always gets x3.
- Multiply and sum. Multiply each digit by its weight, then add all the products together.
- Calculate the remainder. Divide the sum by 10 and take the remainder.
- Subtract from 10. The check digit is (10 - remainder) mod 10. If the remainder is 0, the check digit is 0.
Worked example: the UPC-A 01234567890
Eleven payload digits, weighted from the right. The rightmost one takes x3, and the weights alternate from there.
| Digit | Weight | Product |
|---|---|---|
| 0 | x3 | 0 |
| 1 | x1 | 1 |
| 2 | x3 | 6 |
| 3 | x1 | 3 |
| 4 | x3 | 12 |
| 5 | x1 | 5 |
| 6 | x3 | 18 |
| 7 | x1 | 7 |
| 8 | x3 | 24 |
| 9 | x1 | 9 |
| 0 | x3 | 0 |
The products sum to 85. The next multiple of ten is 90, so the check digit is 5 and the complete UPC-A is 012345678905. Change any single digit in that number and the sum moves off the multiple of ten, which is exactly the property that makes the check digit useful.
UPC, EAN, and GTIN are the same calculation
These names describe how wide the number is printed, not how it is built. A UPC-A is a GTIN-12, an EAN-13 is a GTIN-13, and an EAN-8 is a GTIN-8. All of them run through the algorithm above unchanged, so there is no separate “UPC check digit formula” to look up. Enter every digit except the last one and the calculator returns the digit that completes it.
| Also called | GTIN format | Digits to enter |
|---|---|---|
| UPC-A | GTIN-12 | 11 |
| EAN-13 | GTIN-13 | 12 |
| EAN-8 | GTIN-8 | 7 |
| ITF-14 / case code | GTIN-14 | 13 |
Why check digits matter
A single transposed or mistyped digit would cause a product to scan as a completely different item. The check digit catches these errors at the point of sale, in warehouse systems, and anywhere GTINs are manually entered. The x3/x1 weighting pattern specifically detects single-digit errors and most adjacent transpositions.
Related tools and guides
Built by SunriseQR, an official GS1 US Solution Partner and hosted GS1 Digital Link resolver. Something not adding up? Get in touch.
Stuck on something?
Not sure this is the right tool? A real person answers every message.