What is a check digit?
When you look at a barcode, you may think that the numbers are random, and not in sequence, when in fact they are. A check digit is the last digit in a sequence code of numbers. It is calculated from all the other digits before it in the code. (It's is the digit furthest to the right).
The purpose of check digit is to identify any human error in the code.
How to calculate a check digit
The following calculation can be used to create the check digit for all the GS1 Identification Keys that require them, including GTINs and GLNs.
Let’s take the GTIN 501234567890C as an example, where C is the check digit. This is how you calculate it:
|Step||What to do|
|1||Starting with the right hand digit of the number, add all the alternate digit values|
|2||Multiply the result of step 1 by 3|
|3||Add up all the other remaining digits|
|4||Add the result of step 2 to the result of step 3|
|5||The check digit is the smallest number that must be added to this sum to reach a multiple of 10|
So to calculate the check digit of the number 501234567890C:
|1||0 + 8 + 6 + 4 + 2 + 0 = 20|
|2||20 x 3 = 60|
|3||9 + 7 + 5 + 3 + 1 + 5 = 30|
|4||60 + 30 = 90|
|5||90 + C = 90. There is no need to round up to a multiple of 10, so C = 0|
|6||Therefore the complete GTIN is 5012345678900|
Now let’s take GTIN 501234567421C, again where C is the check digit:
|1||1 + 4 + 6 + 4 + 2 + 0 = 17|
|2||17 x 3 = 51|
|3||2 + 7 + 5 + 3 + 1 + 5 = 23|
|4||51 + 23 = 74|
|5||74 + C = 80. Therefore In this example C = 6|
|6||Therefore the complete GTIN is 5012345674216|
Check digit calculator
Use our online check digit calculator.