Barcode check digit calculator
The last digit of a product number is a check digit, worked out from the digits before it with a method called GS1 mod 10. Opo Codes has a calculator for it in the barcode generator: type the number without its check digit and it gives the full number. It is free and runs in your browser.
Open the generatorFree. Runs in your browser.
How to do it
- Open the barcode generator on a retail type such as UPC-A. The check-digit calculator is in the GS1 helper.
- Type the number without its check digit: 7, 11, 12 or 13 digits.
- Read the check digit and the full number it gives, and press Use this number to draw the barcode.
- If you already have a full number, type it and the generator says if the last digit is wrong and what it should be.
The mod 10 method
Start at the right-hand end of the number without its check digit. Multiply the first digit by 3, the next by 1, the next by 3, and so on, alternating. Add all the results. The check digit is the amount you must add to reach the next multiple of 10, which is 0 when the sum is already a multiple of 10.
Worked example with the 11-digit UPC-A body 23456789012. From the right the digits are 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2. The results with weights 3, 1, 3, 1 and so on are 6, 1, 0, 9, 24, 7, 18, 5, 12, 3 and 6, which add up to 91. The next multiple of 10 is 100, so the check digit is 9 and the full number is 234567890129.
One method, four lengths
The same method works for GTIN-8, GTIN-12, GTIN-13 and GTIN-14, which means bodies of 7, 11, 12 and 13 digits. In an EAN-13 the rightmost digit of the 12-digit body also takes weight 3, which is the same thing as counting positions from the left as the EAN-13 page does.
A number starting with 2 is for use inside one shop only. The worked number above begins with 2, so it is a fine practice number, and never one to sell with elsewhere.
When the last digit is wrong
If you type a full-length number whose last digit does not match, the generator shows the right one and offers to fix it. A 12-digit number is ambiguous: it can be the body of an EAN-13, or a UPC-A with a wrong check digit, so in the pack tool you get both choices. The bulk generator can fix every row of a list at once.
Questions
Does a correct check digit mean the number is real?
No. It only means the digits are consistent. Whether the number belongs to you comes from GS1 membership, and the tool does not check that.
Why do I get 0 sometimes?
When the weighted sum is already a multiple of 10, nothing needs to be added, so the check digit is 0.
Does the calculator need an internet connection?
No. The sum is worked out in your browser, and once the page has been opened one time it also works offline.
Can I check a whole list?
Yes. Use the bulk barcode generator with a column of numbers. Wrong check digits are flagged on each row and Fix all check digits corrects them.