Barrel length has absolutely nothing to do with calculating the twist rate needed for any given bullet other than adding or subtracting velocity.
What you need to do is refer to some reloading manuals and other charts to figure out how fast a given
length bullet will travel with a given barrel length. A bullets velocity will change about 30 fps per inch of berrel added or removed when the bullet is traveling between 3000 and 3500 fps. So from a reloading manual you can get pretty close in figuring how fast a given bullet will travel with a given barrel length.
Measure how long the bullets are that you might be using and go to the calculator at the link and you can figure out how the minimum velocity for each given bullet. Then take this information and refer to your reloading manuals to figure out how long of a barrel you would need to achieve a certain velocity.
EXAMPLE: The barrel is 1 in 12 inch twist rate. The bullet is .723 inches long and the bore is .224 inches. Plug in those numbers and you get a minimum velocity of 2441 fps. to stabilize that particular bullet. You can get that much velocity out of a revolver.
A 1 in 12 twist barrel will stabilize bullets up to about .8 inches long at 3000 fps. and that is a heck of a long .224 bullet.
http://www.uslink.net/~tom1/twistrate.htm