Peter White suggests getting as close to 18.5% of your leg length as you can (
see link). I measured and came pretty close to 165mm, which is the length I prefer, so the formula makes some sense to me. Of course, if you have super short or super long legs, it'll be hard to find cranks in the length you want.