Banking
Bank Routing Numbers: The Backbone of US Financial Transactions
If you have ever set up a direct deposit, paid a bill from your bank account or written a check, you have used a routing number. It is a nine-digit code that tells the US payment system which financial institution should receive or release the money. Because the code is long and the consequences of a typo can be a delayed paycheck or a returned payment, it is built with a checksum that catches most mistakes. This article explains how.
A short history
The American Bankers Association introduced the numbering system in 1910 to make check processing faster and less error-prone. That is why the code is still widely called the ABA number or the ABA routing transit number (RTN). Today the same nine digits identify institutions for check clearing, direct deposit, bill payment and wire transfers, and the Federal Reserve Banks maintain the directories that list them.
The structure of the number
Each part of the nine digits has a meaning:
- Digits 1 to 4: the Federal Reserve routing symbol. The first two digits point to the Federal Reserve district that handles the institution, the third identifies a check-processing center, and the fourth a state within the district. Ranges beginning 01 to 12 are traditionally used for district banks, with 21 to 32 for thrift institutions and 61 to 72 for electronic transactions.
- Digits 5 to 8: the ABA institution identifier. These four digits identify the specific bank, credit union or other institution.
- Digit 9: the check digit. This is calculated from the first eight digits and lets software confirm that the number was typed correctly.
Larger banks often hold several routing numbers, for example one per region from a past merger. Some also use a different number for wire transfers than for check and direct-deposit payments, which is why you should always read the number from your bank’s own instructions for the kind of payment you are making.
The weighted checksum
Unlike Luhn, the routing checksum uses repeating weights of 3, 7 and 1. Multiply each digit by its weight, add the results, and the total must be divisible by 10. Written as a formula, with digits d1 to d9:
3(d1 + d4 + d7) + 7(d2 + d5 + d8) + 1(d3 + d6 + d9) must equal a multiple of 10 As an illustration, take the digits 0 2 1 0 0 0 0 2 1, which are used here purely to demonstrate the arithmetic:
- 3 × (0 + 0 + 0) = 0
- 7 × (2 + 0 + 2) = 28
- 1 × (1 + 0 + 1) = 2
The total is 30, which is divisible by 10, so the checksum passes. Change any one digit and the total changes. Swap two neighbouring digits and the weights usually turn the total into a non-multiple, so the error is caught.
The checksum in JavaScript
function passesRoutingChecksum(value) {
const rtn = String(value).replace(/\s/g, "");
if (!/^\d{9}$/.test(rtn)) return false;
const d = rtn.split("").map(Number);
const sum =
3 * (d[0] + d[3] + d[6]) +
7 * (d[1] + d[4] + d[7]) +
(d[2] + d[5] + d[8]);
return sum % 10 === 0;
} Keep the number as a string. Routing numbers can begin with a zero, and converting them to a numeric type silently removes it.
Why a passing checksum is not enough
Roughly one in ten random nine-digit strings will satisfy the weighted checksum, so passing it only proves the number is plausible. To know whether a number is actually assigned to an institution, you must compare it with an official directory. The Federal Reserve Financial Services publishes its routing directories through FRBservices.org, and our routing number checker performs both steps: it checks the weighted checksum and then looks the number up in a public institution directory.
Even a successful match does not tell you anything about a particular customer’s account. A routing number is public information. Thousands of people share the same one, and knowing it reveals nothing private. The account number is the part that identifies a specific account, which we cover in our guide to account number validation.
Common routing number mistakes
- Using the wrong number for the payment type. A wire routing number can differ from the one used for direct deposit at the same bank.
- Dropping or adding a digit. This is caught instantly by the length rule and nearly always by the checksum.
- Copying the number from an old document. Banks merge and retire numbers, so a number that once worked may no longer be valid.
- Confusing the routing number with the account number. Routing numbers are always exactly nine digits, while account numbers vary in length.
Tips for businesses collecting routing numbers
- Validate length and checksum as the customer types, and show a friendly message when something looks wrong.
- Check the number against the current directory before you submit a payment, because directories change.
- Show the institution name back to the customer so that they can confirm it is their bank.
- Follow the operating rules of the network you use; the ACH rulebook is maintained by Nacha.
Small checks at the form stage prevent returned payments, extra fees and frustrated customers. For common questions about how our own lookups work, see the FAQ.
Key takeaways
A US routing number has three parts: a Federal Reserve routing symbol, an institution identifier and a check digit. The weighted 3-7-1 checksum catches most typing errors, but only a directory lookup can show whether a number is assigned. Treat the checksum as a quick filter, the directory as the authority, and your bank’s own instructions as the final word on which number to use for each type of payment.
Put it into practice: check the format of a card, routing or account number with the Tvalidora validator, look up an area code or zip code with the US Checker, or read the FAQ to see exactly what a “valid” result means. Tvalidora checks number format only, and never stores what you enter.