Reading Sheldon's info on "chainline" should clear it up sufficiently. There is no need for a formula, and I doubt any formula would be versatile enough to cover all situations without making the task more complex, not more simple.
Single speeds require a more precise chainline than geared bikes- well at least it looks better if the chainline is close. My main concern with BB width is that the c-rings clear the chainstay. Often times I have a crank I want to use on a specific frame. Each crank will have different requirements for spindle length. It's much easier to figure this out by trial and error, or some guestimated measurement. Depending on frame design, and the specific crank/spindle length combo, sometimes I can't use the crank I'd like. If I can make the rings clear the chainstay, and there's only a slight misalignment to the chainline, spacers or shims on the chainring can get the job done.
Easiest for me is to have a sampling of bb's in varying lengths, and select the one I suspect to be close, for a fit test. No formula could be devised to simply cover my needs.