There is definitely a formula. Usually it is obtained by a test at 2-3 minutes and another test at 15-20 minutes. A curve is fit though those two points which can tell you an estimate for critical power at other time intervals. Unfortunately, I can't tell you the equation off the top of my head, but it should be in any number of training books. I believe it is listed in Friel's book, though I am not sure.
__________________
Cat 2 Track, Cat 3 Road.
"If you’re new enough [to racing] that you would ask such question, then i would hazard a guess that if you just made up a workout that sounded hard to do, and did it, you’d probably get faster." --
the tiniest sprinter