there is no algorithm or somethink.
try to find the BIC / SWIFT Code on http://www.bankers-telenet.com ! Use the fulltextsearch or the Guided bank search. If you find the bank or the swift code you can see the fedwire or clearing number of the bank.