Luhn Checksum Calculator
Validate any credit card, IMEI, or Luhn-checksum identifier, or generate the check digit for a partial number. Shows the step-by-step mod 10 trace, detects Visa, Mastercard, Amex, and Discover BINs, and flags trivially valid numbers.
Luhn Checksum Examples
| Partial number | Check digit | Complete number |
|---|---|---|
| 7992739871 | 3 | 79927398713 |
| 4992739871 | 6 | 49927398716 |
| 123456781 | 4 | 1234567814 |
| 453201511283036 | 6 | 4532015112830366 |
| 601111111111111 | 7 | 6011111111111117 |
Frequently Asked Questions about the Luhn Checksum Calculator
What is the Luhn algorithm?
The Luhn algorithm (also called mod 10 or modulus 10) is a simple checksum formula invented by IBM scientist Hans Peter Luhn in 1954 and patented in 1960 (US Patent 2,950,048). The patent expired and the algorithm entered the public domain in 1977, which is why it shows up in so many open standards. From the rightmost digit moving left, every second digit is doubled (and 9 subtracted if the result exceeds 9), then all the digits are summed. The number is valid if the total is divisible by 10.
What errors does Luhn catch and what does it miss?
Luhn catches every single-digit typo and most adjacent-digit transpositions, which together account for the vast majority of human keying errors. It does not catch the specific transposition of 09 to 90 or 90 to 09 (both pairs sum to the same Luhn contribution), nor twin-digit substitutions like 22 swapped with 55. It also will not detect insertions or deletions that change the digit count. Luhn is a cheap, lightweight checksum, not a cryptographic hash.
Where is the Luhn algorithm actually used?
Most magnetic-stripe credit and debit card numbers carry a Luhn check digit (Visa, Mastercard, Amex, Discover, Diners, JCB). It also appears in IMEI device identifiers, the Canadian Social Insurance Number (SIN), the US National Provider Identifier (NPI) for healthcare, some national identifiers (Greek SSN, Israeli ID), survey IDs, and many internal account-number schemes. Anywhere a system needs a quick format check on a hand-keyed identifier, Luhn is the default.
Does a valid Luhn number mean the card is real or authorized?
No. Luhn is only a checksum. For example, 4111 1111 1111 1111 passes the calculation, but that result does not establish an issued or authorized account. Issuer, expiration, authorization, and fraud checks are separate.
Why does the calculator flag numbers like 0000000000000000?
A string of identical digits where the doubling pattern works out to a multiple of 10 will pass Luhn trivially, even though no issuer would ever assign such a number. The flag on all-same-digit inputs is there so you do not mistakenly conclude that a placeholder, test value, or empty form field is a valid identifier. The check digit is doing its job mathematically; the warning is doing its job semantically.
Related Calculators
More calculators in "Tech"
HTTP Status Code LookupIP CIDR Overlap CalculatorUTF-8 Byte CounterBits to Bytes ConverterBinary to Decimal ConverterBinary to Text Converter
See all 98 calculators in "Tech"