Barcode standards
What Is a Barcode Check Digit and How Does It Work?
The final digit in a GTIN is not random. It is calculated from the preceding digits so systems can detect many common number-entry errors before the identifier is used or printed.
Updated September 14, 2026
For GTIN-8, GTIN-12, GTIN-13 and GTIN-14, the final digit is a mandatory GS1 check digit calculated from the preceding digits with alternating weights of 3 and 1. It helps verify that the number has been composed correctly, but it does not prove that the GTIN was legitimately assigned to a product or that the barcode belongs to a particular company.
What a check digit actually checks
GS1 describes the check digit as the final digit of fixed-length numeric GS1 identification keys. Its job is to help ensure the integrity of the identifier by checking whether the digits are consistent with the GS1 calculation method.
That is narrower than many people assume. A mathematically correct check digit does not register a product, create a GTIN allocation or prove ownership. It only tells you that the number passes the check-digit calculation.
| Identifier | Typical retail carrier | Final digit |
|---|---|---|
| GTIN-8 | EAN-8 | Check digit |
| GTIN-12 | UPC-A | Check digit |
| GTIN-13 | EAN-13 | Check digit |
| GTIN-14 | ITF-14 or other GS1 carriers | Check digit |
How the GS1 check-digit calculation works
GS1 uses the same standard check-digit method for fixed-length numeric identification keys that require one. Starting from the rightmost digit before the check digit, multiply alternating positions by 3 and 1, add the results, then subtract that sum from the nearest equal or higher multiple of 10.
For the GS1 GTIN-13 example 629104150021, the weighted sum is 57. The next multiple of ten is 60, so the check digit is 3 and the completed GTIN is 6291041500213.
- Work with the digits before the check digit.
- Apply alternating weights of 3 and 1 using the GS1 position rule.
- Add the weighted values.
- Subtract the sum from the nearest equal or higher multiple of 10.
- The result is the check digit; if the sum is already a multiple of 10, the check digit is 0.
A correct check digit does not mean the GTIN is officially assigned
The algorithm can be applied to any suitable sequence of digits, so passing it is not evidence that the identifier belongs to your company or product. Official product identification depends on the GTIN allocation and its associated records, not only the arithmetic of the last digit.
If a retailer or marketplace requires a GS1-verifiable product identifier, verify the assignment separately. Treat check-digit validation and product-identity validation as two different tasks.
Why BarcodeBatch does not silently repair check digits
BarcodeBatch follows a no-mutation rule. For fixed-length EAN and UPC generation it checks structural length and characters, but it does not replace the last digit, pad the value or rewrite the identifier to make it match a checksum.
That is deliberate. A generator should not alter a product identifier behind your back. If you are using an official GTIN, validate the source number with GS1 or your own product master data before printing production labels.
Important: For GS1 trade-item use, the check digit is part of the GTIN standard even though BarcodeBatch does not enforce or auto-correct it during rendering.
Common check-digit mistakes
Most mistakes happen before the barcode image is generated: a digit is mistyped, a leading zero disappears in a spreadsheet, the wrong GTIN length is used, or someone calculates a new last digit for a number that was never officially assigned.
- Keep GTIN values as text when leading zeros matter.
- Do not remove a leading zero from a GTIN-12 just because a spreadsheet hides it.
- Do not invent a GTIN by choosing digits and calculating only the final digit.
- Validate the identifier source separately from the barcode image.
- Scan-test printed labels after the number itself has been confirmed.
Common questions
Frequently asked questions
Is the check digit always the last digit of a GTIN?
Yes. For GTIN-8, GTIN-12, GTIN-13 and GTIN-14, the final digit is the check digit calculated from the preceding digits.
Does a valid check digit prove that a UPC or EAN is real?
No. It proves only that the digits satisfy the check-digit calculation. It does not prove that GS1 assigned the GTIN to a specific company or product.
Will BarcodeBatch fix a wrong check digit automatically?
No. BarcodeBatch does not mutate supplied barcode values. It renders structurally valid input as supplied and leaves identifier validation or correction to the source system or standards authority.
Where can I calculate an official GS1 check digit?
GS1 provides a public Check Digit Calculator and a manual calculation guide. Use those when you are creating or validating a GS1 identification key.
Sources & standards
Technical claims in this guide are checked against primary or official documentation where available.