EDGE ENGINE SUB-2MS DETERMINISTIC V8 EXECUTION • ZERO DATA RETENTION • EXPLORE API SPECS →

How to Calculate an IBAN Check Digit (ISO 7064 MOD-97-10)

IBAN check digits are computed with ISO 7064 MOD-97-10. Rearrange the string, convert letters to numbers, take the integer modulo 97, and subtract it from 98.

Updated 2026-09-30 · 4 min read

The algorithm

To generate the two check digits for a country code and a BBAN, run the following steps.

  • Build a provisional string: the BBAN, then the country code, then "00".
  • Move the first four characters (the country code and "00") to the end if you started from the full IBAN; for generation you already appended them.
  • Convert every letter to a number using A = 10, B = 11, … Z = 35.
  • Compute the big integer modulo 97.
  • Check digits are 98 minus that remainder, zero-padded to two digits (a remainder of 0 gives 98).

Worked example

Take the classic example, GB82 WEST 1234 5698 7654 32. The BBAN is WEST12345698765432 and the country code is GB.

Append GB and the placeholder 00: WEST12345698765432GB00. Convert the letters W, E, S, T, G, B to 32, 14, 28, 29, 16, 11. The string becomes 3214282912345698765432161100.

3214282912345698765432161100 mod 97 = 16. The check digits are 98 − 16 = 82, giving GB82. Validating the finished IBAN moves GB82 to the end and re-runs modulo 97; a valid IBAN leaves a remainder of exactly 1.

Validating an existing IBAN

Validation is the same arithmetic in reverse order: move the first four characters to the end, convert letters to numbers, and check that the result modulo 97 equals 1.

Because the numbers are long, compute the modulo incrementally — carry a running remainder and multiply by ten for each digit — rather than building one giant integer.

Common mistakes

Most IBAN defects are structural rather than checksum failures.

  • Using the wrong length for the country (the checksum can pass while the length is still invalid).
  • Stripping spaces incorrectly, or keeping them in the modulo input.
  • Treating a checksum pass as account verification.
  • Assuming one length fits every country in a batch.

Try it on real data

Global IBAN, BIC/SWIFT & Bank Routing Validator API →

High-speed ISO 13616 MOD-97 IBAN checksum verification, ISO 9362 BIC/SWIFT validation, and bank routing extraction across 87 countries

Open the tool

Frequently Asked Questions

What modulus does an IBAN use?

IBANs use ISO 7064 MOD-97-10. The whole string is rearranged and reduced modulo 97; a valid IBAN leaves a remainder of 1.

Why can the check digits be 98?

The check digits are 98 minus the remainder from the modulo-97 step. If the remainder is 0 the check digits are 98; otherwise they are zero-padded to two digits, so a remainder of 96 gives 02. A finished IBAN is accepted when the same modulo-97 calculation leaves a remainder of exactly 1.

Can I compute IBAN check digits without a library?

Yes. The algorithm needs only string manipulation, digit conversion, and an incremental modulo, so it fits in a few lines in any language.

Primary sources