A valid number
- Input
- 111000025
- Expected output
- 3+7+1+0+0+0+0+14+5 = 30, resto 0: válido
Prefix 11 points to the Dallas district and the sum closes at 30.
how to calculate the routing number check digit
The ninth digit of a routing number is not random: it falls out of a sum with repeating weights. This page walks through the whole calculation, how to find the missing digit when you only have 8 digits, and the kind of mistake it cannot see.
Prefix 11 points to the Dallas district and the sum closes at 30.
5 is missing to reach 30, so the full number ends in 5.
Changing the final 5 to 4 moves the sum by 1, and 29 is not a multiple of 10.
This is the Stripe test routing number. The zeros add nothing, only the 1 in the first and second positions.
The digits 8 and 0 differ by 8, not 5, so the swap changes the sum and the checksum flags it.
The digits 0 and 5 differ by 5, and the change of 10 in the sum leaves the remainder alone. Both numbers carry a valid 11 prefix.
Multiply the 9 digits by the weights 3, 7, 1, 3, 7, 1, 3, 7, 1 and add them up: the number is valid when the total is a multiple of 10. To find the ninth digit, add only the first 8 products and take 10 minus the remainder after dividing by 10 (0 if the remainder is 0). In 111000025 the first 8 products add up to 3+7+1+0+0+0+0+14 = 25, 5 short of 30, so the ninth digit is 5.
No. About one in ten numbers with a valid prefix passes the sum, and most of them belong to no bank. The checksum exists to catch typos before a payment is sent, not to confirm the institution exists.
The weights 1, 3 and 7 share no factor with 10, and that is what guarantees catching every single-digit error. Because neighboring positions use different weights, most swaps are caught too. No official source consulted explains why the ABA chose exactly these three values.
No. Cards use Luhn, which doubles every other digit and adds the digits of the results. The routing number uses fixed weights 3, 7, 1 with no digit adding. Both end with a multiple-of-10 check.
1100-0000-0
| Digit | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|---|---|
| Weight | 3 | 7 | 1 | 3 | 7 | 1 | 3 | 7 | 1 |
| Product | 3 | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3 + 7 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 10 | 10 mod 10 = 0
Everything runs in your browser. No number you type or generate is sent to a server, and analytics only receives the action and the overall result, never the number.