What is the Check Digit?
The check digit is the last two characters of the IBAN. It is used to verify the correctness of the entire IBAN number and detect any potential errors when entering or processing it. The check digit is calculated using a specific formula, which we will explain in the following steps.
Step 1: Convert the IBAN to a Numeric Format
The IBAN is usually presented with alphanumeric characters. To calculate the check digit, we first need to convert the letters to numbers. Assign each letter a value according to its position in the alphabet (A=10, B=11, C=12, and so on), and leave the numbers as they are.
Step 2: Rearrange the IBAN
Move the first four characters (the country code and check digits) to the end of the IBAN. This will prepare the IBAN for the next step of the calculation, where we will replace each letter with the corresponding numeric value.
Step 3: Replace Letters with Numbers
Now, replace each letter of the IBAN with the corresponding numeric value obtained in Step 1. After this step, your IBAN should consist only of digits.
Step 4: Perform Modulo 97 Calculation
Next, perform a modulo 97 calculation on the rearranged and converted IBAN (excluding the check digits), using the following formula:
Let D be the numeric representation of the IBAN (as obtained in Step 3) Perform D modulo 97 The remainder of the calculation should be subtracted from 98
For example, if the remainder is 32, subtracting it from 98 gives us 66.
Step 5: Create the Check Digit
The result obtained in Step 4 will be a two-digit number. If it is less than 10, append a leading zero to it. This number is your check digit.
Calculating the check digit for an IBAN is a straightforward process that guarantees the integrity of the account number. By following the steps outlined in this guide, you can accurately generate the check digit for any IBAN, ensuring its validity for international transactions. Remember to double-check your calculations and take care when entering the IBAN in any banking transactions to avoid errors and delays.