A routing number has 9 digits in three parts: a 4-digit Federal Reserve routing symbol, a 4-digit ABA institution identifier, and a check digit, per the ABA's routing number policy.
The first two digits. Banks use 01 to 12. Thrifts use 21 to 32, a range closed to new numbers since 1985. Numbers that start with 00 are for U.S. Government checks, 61 to 72 are electronic transaction identifiers, and 80 is for traveler's checks. Those last two can't receive a direct deposit. The ABA reserves every other range. The tool flags any number outside the bank and thrift ranges.
The check digit. The tool runs the standard check-digit formula: multiply the nine digits by 3, 7, 1, 3, 7, 1, 3, 7, 1, add them up, and the total has to end in 0. Here it is on the sample's 021000021:
0 + 14 + 1 + 0 + 0 + 0 + 0 + 14 + 1 = 30. It ends in 0, so the number passes. Change the last digit to 2 and the total is 31, so it fails.
What a pass doesn't prove. The formula catches most typos, not all. Swapping two digits that differ by 5, like 0 and 5, still passes. And a well-formed number can still point to the wrong account or a closed one.