Skip to content
AZ Tools

Check Digit Calculator: Luhn, Verhoeff, Damm

Compute and verify check digits with Luhn, Verhoeff, Damm and the ISO 7064 family (MOD 11-2, 97-10, 37-2…), and see which typing errors each one catches.

SchemeCheck → complete numberInput already valid?Errors detected on this number
Luhn (mod 10)
Payment cards, IMEI, Canadian SIN
3
79927398713
No
99 of 99 single-character errors (100%)
9 of 9 adjacent swaps (100%)
Verhoeff
Indian Aadhaar numbers
8
79927398718
No
99 of 99 single-character errors (100%)
9 of 9 adjacent swaps (100%)
Damm
Digits only, one table
1
79927398711
No
99 of 99 single-character errors (100%)
8 of 8 adjacent swaps (100%)
ISO 7064 MOD 11-2
ORCID, ISNI (check may be X)
8
79927398718
No
100 of 100 single-character errors (100%)
9 of 9 adjacent swaps (100%)
ISO 7064 MOD 11,10
Croatian OIB, German tax ID
5
79927398715
No
99 of 99 single-character errors (100%)
9 of 9 adjacent swaps (100%)
ISO 7064 MOD 97-10
LEI, IBAN (after rearranging)
65
799273987165
No
368 of 368 single-character errors (100%)
10 of 10 adjacent swaps (100%)
Luhn mod 36
Alphanumeric codes
N
7992739871N
No
385 of 385 single-character errors (100%)
9 of 9 adjacent swaps (100%)
ISO 7064 MOD 37-2
Alphanumeric (check may be *)
G
7992739871G
No
386 of 386 single-character errors (100%)
9 of 9 adjacent swaps (100%)
ISO 7064 MOD 37,36
ISAN, GRid
V
7992739871V
No
385 of 385 single-character errors (100%)
9 of 9 adjacent swaps (100%)

'Input already valid?' treats the last character (two for MOD 97-10) of the input as a check; the check column treats the whole input as the number to protect.

Checked against python-stdnum and the published examples of each scheme. Runs entirely in your browser.

How to use

  1. Type the number without its check digit to get the check character for every scheme, or type a complete number to see which schemes accept it.
  2. Read the complete number for the scheme you need; separators are ignored and letters are read as upper case.
  3. Compare the error columns to choose a scheme: they count, for this very number, the single-character errors and neighbour swaps each one detects.

About this tool

Show

A check digit is one or two characters appended to an identifier so that a typing mistake produces an invalid number instead of a different valid one. This calculator runs nine schemes side by side on whatever you type: Luhn (the mod 10 algorithm of payment cards and IMEI numbers), Verhoeff, Damm, the ISO/IEC 7064 pure systems MOD 11-2 (ORCID, ISNI), MOD 37-2 and MOD 97-10 (LEI; IBAN applies it after moving the country code), the hybrid systems MOD 11,10 and MOD 37,36, and Luhn mod 36 for alphanumeric codes. For each it shows the check character to append, the complete number, and whether your input already ends in a correct check. It then does what the textbooks only claim: it takes the complete number, tries every single-character substitution and every swap of two neighbouring characters, and counts how many each scheme would notice, listing a few it would not. On most numbers that makes the differences concrete — Luhn misses the 09↔90 swap and certain twin errors, Verhoeff and Damm catch every single error and every adjacent swap using digits only, and MOD 11-2 does too at the price of an 'X' check character. The census covers those two error types only; jump transpositions (1x3 ↔ 3x1) and phonetic slips such as 15 ↔ 50 are not counted. Spaces, hyphens and dots are ignored, letters are case-insensitive, and schemes whose alphabet does not fit the input are marked not applicable. MOD 97-10 always produces 02–98, as IBAN does, but also accepts the equivalent 00 or 01 when validating. A check digit guards against slips, not forgery: anyone can compute a valid one.

Frequently asked questions

Which check digit algorithm is best?

For digits only, Verhoeff and Damm detect every single-digit error and every adjacent transposition; Damm is simpler to implement because it needs one table and no permutations. If a letter X is acceptable in the check position, ISO 7064 MOD 11-2 does the same. Luhn is weaker but is the standard for payment cards, so interoperability usually decides.

Why does Luhn miss some errors?

Doubling maps 9 to 18, whose digit sum is 9 again, so swapping 0 and 9 when one is in a doubled position leaves the sum unchanged; 09 and 90 therefore look the same. Twin errors such as 22 → 55 or 33 → 66 can also cancel out. The error column lists examples found on your own number.

Can I validate an IBAN or a card number here?

Cards use Luhn, so the Luhn row answers that directly. An IBAN moves its first four characters to the end before applying MOD 97-10, so paste it rearranged or use the dedicated IBAN validator on this site, which also checks the country length.

What does 'already valid' mean?

It treats the last character (two for MOD 97-10) of your input as a check and tests it. The check column, by contrast, treats the whole input as the payload and tells you what to append.

Why is a scheme shown as not applicable?

Its alphabet does not cover your input: Luhn, Verhoeff, Damm and the MOD 11 systems accept digits only, while Luhn mod 36, MOD 37-2, MOD 37,36 and MOD 97-10 also accept letters A–Z.

Related tools