Homeโ€บGlossaryโ€บCheck Digit

Check Digit

General

Check 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.

Frequently Asked Questions

What's the point of a check digit if the other digits already carry the real information?
It exists purely to catch mistakes, a mistyped, swapped, or dropped digit almost always breaks the checksum, so a system can reject an invalid identifier instantly instead of accepting bad data. The [Credit Card Validator](/credit-card-validator/) uses exactly this kind of check before a card number is even sent to a payment processor.
Is there one universal check-digit formula?
No, different identifier systems use different formulas, the Luhn algorithm behind credit cards and [IMEI](/glossary/imei/) numbers works differently from the weighted mod-11 formula used in a [VIN](/glossary/vin/), even though both serve the same error-detection purpose.
Can a check digit catch every possible typing mistake?
No, it's designed to catch the most common ones, especially single mistyped digits and adjacent-digit transpositions, but it can't guarantee detection of every conceivable multi-digit error, since a small fraction of scrambled combinations can still happen to satisfy the formula by coincidence.
Does a valid check digit mean the identifier definitely exists?
No, it only means the number is structurally well-formed, not that it corresponds to a real, issued identifier, a fabricated but arithmetically valid credit card number will still fail at the issuing bank even though it passes the checksum.
Why do some identifiers use a letter like X as a check digit?
When a check-digit formula can produce a remainder of 10 but the identifier only has room for a single character, some systems represent that value with a letter instead, a VIN, for instance, uses the letter X to stand in for a remainder of 10 rather than needing two digits.