My "formula" is 8th grade maths, but perhaps we've all forgotten everything we were taught in school because at the time we didn't realise which bits would be useful. I'll try to make this as simple as possible for the folks who flunked math.
First you need to know (i) your winrate in BB/100 hands (ii) your standard deviation in BB/100hands. Your database program will be able to tell you these.
By way of example we'll go with a player worth 4BB/100 with a standard deviation of 100BB/100 as in my first post. That player played 1750 hands (note that because we have everything expressed per hundred hands, the figure we work with is 1750/100 = 17.5) and lost 800BB (so they "won" 800BB).
First calculate your mean expected earn, over 1750 hands, the mean earn is 17.5 x 4 BB = 70 BB
Next calculate your actual earn minus your expected earn; 800BB  70BB = 870BB
Now the standard deviation over the period, (square root of 17.5) x (standard deviation per 100 hands); sqrt(17.5)x100 = 418.33
Finally you divide your (earnexpectation) by your standard deviation over the sample; 870 / 418.33 = 2.08.
Over this sample of 1750 hands, our hero has run 2.08 standard deviations below the mean. You now either find a calculator with a normsdist function, or you google for "normal distribution table" and read the value for 2.08, which is 0.9812. The rarity of this swing is of the 98.12th percentile. Or if you prefer 10098.12 = 1.88% chance of this happening. 52:1.
Kc
__________________
"Blah blah blah KC is right"  Ozone
