modulo 97 calculator

Free Modulo 97 Calculator

Compute n mod 97 for extremely large integers, or validate an IBAN using the same modulo 97 rule.

You can paste very long numbers. Spaces and commas are ignored.

What does modulo 97 mean?

“Modulo 97” means the remainder left after dividing a number by 97. For example, if a number divides evenly by 97, the remainder is 0. If not, the remainder is between 1 and 96.

In math notation, you’ll often see this written as n mod 97 or n % 97. This operation is widely used in checksum systems, especially in financial identifiers where data quality is essential.

How to use this modulo 97 calculator

1) Integer mode

  • Select Integer remainder.
  • Enter any whole number (short or extremely long).
  • Click Calculate to get the remainder.

This mode is useful for number theory, programming checks, and divisibility tests by 97.

2) IBAN mode

  • Select IBAN check.
  • Paste an IBAN (spaces are allowed).
  • The tool reports the modulo 97 remainder and whether the IBAN passes the standard check.

For valid IBANs, the remainder should be exactly 1.

Why modulo 97 is common in banking and validation

Modulo 97 is part of the international validation approach for IBAN and similar reference systems because it offers strong error detection while still being fast to compute.

  • Catches most typing mistakes (single-digit errors and many transpositions).
  • Simple to implement in software and spreadsheets.
  • Scales to large values without needing floating-point math.

Examples

Example A: Standard integer

If n = 2026, then this calculator computes 2026 mod 97 and returns the remainder.

Example B: Very large integer

For an input with hundreds or thousands of digits, the tool processes digits one at a time, so it stays accurate even when the number is larger than JavaScript’s normal integer limit.

Example C: IBAN verification

When checking an IBAN, letters are converted to numbers (A=10, B=11, ..., Z=35), the value is rearranged per standard rules, and then modulo 97 is applied. A remainder of 1 indicates a valid check digit structure.

Technical note: large-number safety

This page uses an iterative remainder algorithm. Instead of converting the full input into one massive numeric type, it updates the remainder digit by digit:

remainder = (remainder * 10 + currentDigit) mod 97

Because the intermediate value stays small, the method is stable and exact for very long inputs.

Common input mistakes

  • Using decimals (modulo here expects whole numbers).
  • Adding unsupported symbols in integer mode.
  • Checking an incomplete IBAN string.

If your input is invalid, the calculator will show a clear error message and tell you how to fix it.

🔗 Related Calculators