Transit numbers are based on the original bank branch that you opened your account with. They are closely related to the actual routing numbers on the MICR line.
The ABA RTN (American Bankers Association Routing Transit Number) appears in two forms on a standard check – the fraction form and the MICR (magnetic ink character recognition) form. Both forms are essentially the same information, with minor differences.
The MICR form is printed in magnetic ink, and is machine-readable; it appears at the bottom left of a check, and consists of nine digits. (see image below #1)
The fraction form was used for manual processing before the invention of the MICR line, and still serves as a backup in check processing should the MICR line become illegible or torn; it generally appears in the upper right part of a check near the date. (in the example below, the transit number reads as "67-768/95")
The MICR number is of the form XXXXYYYYC, while the fraction is of the form PP-YYYY/XXXX.
(XXXX is Federal Reserve Routing Symbol, YYYY is ABA Institution Identifier, and C is the Check Digit)