How Barcode Check Digits Work

A check digit is calculated from the other characters in an identifier. It helps detect some typing, transmission, or decoding errors, but it does not identify who assigned the number or whether the associated item is genuine.

What a check digit checks

A receiving system repeats the format’s calculation and compares the expected check digit with the supplied one. A mismatch means the number is mathematically inconsistent for that algorithm. A match means only that the characters satisfy the calculation.

It can detect

Many single-digit changes and some transpositions, depending on the algorithm and the positions involved.

It cannot detect

Every possible error, copied valid numbers, fabricated identifiers with recalculated digits, or incorrect real-world associations.

GS1 Mod 10 in this site’s validator

The shared validation module uses GS1 Mod 10 for GTIN-8, GTIN-12, GTIN-13, GTIN-14 and the corresponding EAN, UPC, ISBN-13, and ITF-14 number types. Starting from the right side of the payload, digits are multiplied alternately by 3 and 1. The check digit makes the total a multiple of 10.

check digit = (10 − (weighted sum mod 10)) mod 10

Verified EAN-13 example

Start with the 12-digit payload 400638133393. The table and result below are generated from the same shared calculation used by the number checker.

EAN-13 check digit calculation for payload 400638133393.
Step 123456789101112
Digit 400638133393
Weight ×1×3×1×3×1×3×1×3×1×3×1×3
Product 40018324193999
  1. 1. Add the products: the weighted sum is 89.
  2. 2. Find the remainder: 89 mod 10 = 9.
  3. 3. Calculate the check digit: (10 − 9) mod 10 = 1.
  4. 4. Append it: the complete EAN-13 value is 4006381333931.

Not every barcode number uses the same algorithm

The symbol format or identifier standard determines the rule. For example, the shared validator uses ISBN-10 Mod 11 for ISBN-10 values, where the final character can be X. Code 39 may use an optional Mod 43 check character, while Code 128 includes a symbol check character that is handled by the encoder rather than displayed as a normal payload digit.

Do not apply the EAN or GTIN formula to an unrelated format. Select the exact type in the barcode number checker when you know it, or review all candidates when using automatic detection.

What a valid result does not prove

A correct check digit does not prove:

  • That the identifier was assigned or registered.
  • That a product, book, case, or record exists.
  • That the displayed company or brand owns the number.
  • That an item, website, price, origin, or claim is authentic or safe.