2026-07-20 · 8 min read

IBAN Check Digits Explained: How MOD-97 Catches Errors

Why IBAN Has Check Digits

Every IBAN contains exactly two check digits, located right after the country code (positions 3 and 4). Their job is to verify that the rest of the IBAN was entered correctly. If you make a typo when typing an IBAN, the check digits will not match, and the bank will reject the transfer — protecting you from sending money to the wrong account.

The MOD-97 Algorithm

The check digits are calculated using the MOD-97 algorithm, defined by ISO 7064. Here is the step-by-step process:

Step 1Move the first four characters (country code + check digits) to the end of the IBAN.
Step 2Convert every letter to a number: A=10, B=11, C=12, ..., Z=35.
Step 3The result is a long number. Divide it by 97 and check the remainder.
Step 4The remainder must be exactly 1. If it is anything else, the IBAN is invalid.

Worked Example: Germany

Let's verify DE89 3704 0044 0532 0130 00 (the classic German example IBAN). First strip spaces, then move the country code and check digits to the end: 370400440532013000 + DE89370400440532013000DE89. Convert letters: D=13, E=14, so 370400440532013000131489. Now compute this number modulo 97. The result is 1 — the IBAN is valid.

Why 97 and 99.94%?

The number 97 is prime, which makes the algorithm extremely effective at catching errors. A single changed digit, two swapped digits, or a missing digit will almost always change the remainder. The ISO 7064 standard reports that MOD-97 detects about 99.94% of all errors — far better than any simple checksum.

Try It Yourself

You can verify any IBAN instantly with our free tools:

IBAN Validator/validate/Check any IBAN against the MOD-97 algorithm
IBAN Calculator/iban-calculator/Compute the correct check digits from domestic account details
Check Digit Generator/Generate random valid IBANs for testing

Related Resources