Hi Pat - I have no formula. As a self-accompanying guitarist, that's why God invented capos.

They are truly a god-send. I wouldn't even begin to know how to theorize arriving at such an answer.
If it's a cover song - I test drive the song in C, G, D first. As already stated in the thread a lot depends on the melody line. Piano Man comes to mind - you need to sing in two octaves. I have a limited range but ended up in G or A primarily because I use harmonica, and didn't want to buy an F# harmonica but had the other two.
I'm working on a song now that has a melody line within the C3-C4 octave. It was originally in the Key of C but I couldn't get much vocal power. So I regenerated RT versions of RB in the keys of D, E, F, G and settled on F - I never sing in F but it gave me power for a very narrow melodic range.
Normally I would experiment using the capo on the old 6 sliding up and down the neck. . . but I wanted to see what RB would do with multi-regenerations with only 512 RAM . . . not even a hiccup.
The only rule seems to be that there ain't a rule to me. You got to test drive the product. Does it save that much time to know in what key you should be able to theoretically sing? I suppose if you're a world famous tenor it does. Then you choose only the songs that puts your voice in it's comfort zone - but isn't it true for all of us. Maybe if one sat down with a vocal coach and worked out a vocal range, but you'd still be able to sing in multi keys within your vocal range.
Capo seems to be the best answer for finding out. Too simplistic an answer?
Bad cold day today - have patience please.

Ian