spindle lengths are not something you can calculate easily
each crankset has it's own requirement and these can vary wildly... is it for a double or a triple, is is for a road or MTB BB shell, is it an asymmetrical spindle?
best best is to look up what was on your bike and crank originally and use that, and if changing out the crank, use what the crank's spec are
__________________
Life is too short not to ride the best bike you have, as much as you can
(looking for Torpado Super light frame/fork or for Raleigh International frame fork 58cm)