Every barcode number ends with a special digit called the check digit. This single digit acts as a mathematical safeguard that catches data entry errors, transposition mistakes, and scanning failures. Whether you are assigning new GTINs, building barcode systems, or troubleshooting a barcode that will not scan, understanding how the check digit is calculated is essential. Our free calculator computes the check digit for any GTIN, SSCC, or GLN and shows you the step-by-step math.
Free Check Digit Calculator
Enter the digits of your GTIN, SSCC, or GLN (without the check digit) and see the correct check digit calculated step by step.
Calculate Check Digit - FreeWhat is a Check Digit?
A check digit is the final digit of a barcode number. It is not part of the product identification itself. Instead, it is a mathematically derived value that allows scanners and software to detect errors. If even a single digit in the barcode is wrong, the check digit calculation will fail, alerting the system that the data is corrupted.
The GS1 Mod-10 algorithm (also known as the "Luhn-like" algorithm for GS1) is used for all GS1 identifiers:
- GTIN-8 (EAN-8): 7 data digits + 1 check digit
- GTIN-12 (UPC-A): 11 data digits + 1 check digit
- GTIN-13 (EAN-13): 12 data digits + 1 check digit
- GTIN-14: 13 data digits + 1 check digit
- GLN: 12 data digits + 1 check digit
- SSCC: 17 data digits + 1 check digit
Step-by-Step: The GS1 Mod-10 Algorithm
Let us calculate the check digit for the GTIN-13 number 890123456789? (where ? is the check digit we need to find):
Worked Example: GTIN-13 Check Digit
Step 1: Write out the digits and assign alternating weights (1, 3, 1, 3...)
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| Digit | 8 | 9 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| Weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| Product | 8 | 27 | 0 | 3 | 2 | 9 | 4 | 15 | 6 | 21 | 8 | 27 |
Step 2: Sum all products
8 + 27 + 0 + 3 + 2 + 9 + 4 + 15 + 6 + 21 + 8 + 27 = 130
Step 3: Find nearest multiple of 10 >= sum
Nearest multiple of 10 >= 130 is 130
Step 4: Subtract
Check Digit = 130 - 130 = 0
Complete GTIN-13: 8901234567890
Where Check Digits Apply
The same Mod-10 algorithm applies to all GS1 identifier types. Our calculator supports:
- GTIN-8, GTIN-12, GTIN-13, GTIN-14: Product identification barcodes
- SSCC (Serial Shipping Container Code): 18-digit logistics unit identifier
- GLN (Global Location Number): 13-digit location identifier
No matter which type you are working with, the algorithm is the same: multiply by alternating 1-3 weights, sum, round up to nearest 10, and subtract.
Common Check Digit Mistakes
- Manually assigning a random check digit: The check digit must be calculated, never guessed. Even being off by 1 makes the barcode invalid.
- Confusing weight order: Some resources show weights starting with 3-1-3-1 instead of 1-3-1-3. The order depends on which position you start from. Our calculator handles this automatically.
- Recalculating after changing other digits: If you change any digit in a GTIN, you must recalculate the check digit. The old check digit is no longer valid.
- Including the check digit in the calculation: When calculating, only use the data digits, not the check digit position itself.
Quick Validation Trick
If you include the check digit in the Mod-10 calculation (all digits including the last one), the total should be a perfect multiple of 10. If it is not, the barcode is invalid. Try it with our GTIN Validator.
Frequently Asked Questions
What is the GS1 Mod-10 algorithm?
The GS1 Mod-10 algorithm is a formula that calculates a check digit by multiplying each digit by alternating weights of 1 and 3, summing the results, and subtracting from the nearest multiple of 10. It is used for all GS1 barcode numbers including GTINs, SSCCs, and GLNs.
Can I calculate check digits in Excel?
Yes, but the formula is complex and error-prone in spreadsheets. It is much easier and safer to use our Check Digit Calculator which shows the step-by-step calculation and eliminates formula errors.
Is this calculator free?
Yes. Calculate check digits for GTINs, SSCCs, and GLNs with no limits and no registration required.
Calculate Your Check Digit
Enter your digits, see the step-by-step Mod-10 calculation, and get the correct check digit instantly.
Open Check Digit Calculator