Bullet stability is a function of a bullet's rotational velocity, the bulets forward velocity, the air density, and the shape of the bullet.
Forward velocity starts as muzzle velocity but it slows down with distance traveled because of atmospheric drag which is also a function of air density.
Rotational velocity starts at the rate determined by the muzzle velocity and barrel twist but it too slows down with distance and and also varies a little with air density. Typically the rotational velocity drops more slowly than the forward velocity, tending to increase stabiity with distance for a given instantaious velocity.
Bullet shape affects how much forward kinetic energy and rotational kinetic energy the bullet looses as it pushes air out of the way. That's fairly predictable at speeds over mach 1.3 and below mach 0.9, but gets complex at transsoinc velocity where 22LR bullets are frequently used.
You might want to play with the caluclations at this site:
http://www.eskimo.com/~jbm/calculations/drag/drag.html
It's a little tedious to enter the bullet shape data, but what it will show is that stabilty is not only a function of barrel twist but is highly dependent on the velocity range the bullet experiences between the muzzle and the target. In my opinion that informaion is of more use to show how complex bullet stability is than it is to directly predict the required twist rate. However, it does show that bullets shot in the range of mach 0.9 to mach 1.3 require a faster twist barrel than those shot shot at either higher or lower velocities.
The conditions where you shoot matter too. Higher temperature, higher altitude, lower barometric pressure, and (to a small extent) higher humidty all reduce air density and low air density allows heavier bullets to be shot from a given twist rate barrel. To add more confusion the velocity for a given mach value increases with temperature but is nearly independent of pressure.
The bottom line is to use the barrel lenght and twist which works with the ammo you choose and the distance you shoot at your location, not what the above program predicts. Accuracy requires a bullet to stabilize but not be severely over stabilized.
It should be obvious that for a given bullet fired from a given gun in a given atmosphere bullet stability still changes with the distance the bullet travels. It may become more or less stable with distance.
I'm not going to attemp to tell you what what the best twist rate is, other than to say that the firearms industry has been testing what works for 22LR for 100+ years. I shoot mostly at over a mile elevation and mostly in warm weather in the mountains of southern Arizona. My rifles will typically shoot considerably heavier bullets than the "recommended" twist rates. What works for me probably woudn't be right for you.