Check Digit
GeneralCheck Digit (Identifier Validation)
A single digit at a fixed position in an identifier, calculated from the other digits with a defined formula, used to catch transcription errors.
Definition
A check digit is a single digit added to an identifier, a credit card number, VIN, IMEI, or product barcode like a GTIN, that's mathematically derived from the other digits using a fixed formula. Its only job is error detection: if someone mistypes, transposes, or drops a digit while entering the number, the checksum almost always fails to match, letting a system flag the entry as invalid before it's ever processed further.
Different identifier systems use different formulas. Credit cards and IMEI numbers use the Luhn algorithm (doubling every second digit and checking the total is a multiple of 10), while a VIN uses a weighted mod-11 calculation. Validators across the platform, like the Credit Card Validator, implement whichever formula matches the identifier they check.
Key Things to Know
- Purpose is error detection, not authentication: a check digit confirms an identifier is well-formed, not that it's a real, issued number, a fabricated-but-valid card number still fails at the bank.
- Formula varies by identifier type: the Luhn algorithm behind credit cards and IMEI differs from the weighted mod-11 formula a VIN uses, so a check digit valid for one system means nothing to another.
- Usually the last character: most systems place the check digit at a fixed position, most commonly the very end, though a VIN is a notable exception, placing it at position 9 of 17.
- Sometimes a letter, not a digit: when a formula can produce a value of 10, some systems (like VIN) substitute the letter X rather than expanding to two characters.
- Catches typos and swaps, not everything: it's reliable against single mistyped digits and adjacent transpositions, but a small number of more complex scrambles can theoretically still pass by coincidence.
Related Terms
Frequently Asked Questions