Grades 9–12 · Mathematics
How can a check digit catch a mistyped product number?
Many product identifiers end with a check digit calculated from the preceding digits. A reader can repeat the calculation after scanning or typing the identifier. If the result does not match, it has evidence of an error, even without knowing which product was intended.
In the diagramA weighted sum checks consistency1× 332× 194515682463 + check digit 7 = 7070 leaves remainder 0 when divided by 10Invented sequence 12345687: a valid check does not prove authenticity.
For the illustrated eight-digit format, multiply the first seven digits by alternating weights 3 and 1, starting with 3. Add the products, then choose a final digit that makes the total a multiple of ten. For the invented sequence 1 2 3 4 5 6 8, the weighted sum is 63, so the check digit is 7.
Changing any single digit to a different decimal digit changes the total by a nonzero remainder modulo ten. The check can therefore detect every single-digit substitution in a correctly formed identifier. It generally cannot locate that error or reconstruct the intended number by itself.
Some multiple changes still pass. Swapping neighboring digits that differ by five changes their weighted contribution by a multiple of ten, so that swap can go undetected. A check digit is a carefully limited consistency test; someone can deliberately calculate one for an invented number, so passing it does not prove that a product or identifier is genuine.
About this explanation
Starting knowledge: Use place values, weighted sums and remainders; distinguish detecting an error from identifying the intended value.
Sources
- GS1 — How to calculate a check digit manually