There is no simple formula. I have seen several that are quite different from one and other. There are just too many variables involved for a simple formula to work.
There is no doubt, gas flow modeling software that is used by the Formula 1 teams, NASCAR, etc. It would be way too complex to ever reduce to a simple rule of thumb.
The best I can suggest is to look at various header manufacturers websites (Hooker for example:
http://www.holley.com/HiOctn/ProdLin...HHSCH/Car.html ) and get a general idea of what has proven successful. Look at smallblock headers for Ford and Chevy. You can get a rough idea of the RPM range they were optimized for by looking at the primary tube OD.
I know this isnt what you want. A nice simple formula would be wonderful, but I have never seen one that was really accurate.
If it helps, Primary tube diameter is probably more important than length, and there is a formula for that:
Cross Sectional Area of a Port or Exhaust Manifold:
Area = Volume of One Cylinder x Peak Torque RPM / 88200 (You then convert Sq. In. to dia.)
The Header inner diameter is the OD minus 2 x the wall thickness which is 18 ga. = .051 - 16 ga. = .063
This works out to: 1 5/8 = 1.52 1 3/4" = 1.65 1 7/8 = 1.77 2 = 1.90 2 1/8 = 2.02