Yes, but...
There is a formula, but it isn't simple.
In the 1960s, ballastician Homer Powley came up with a complex equation to predict chamber pressure and muzzle velocity based on the ratio of bullet to powder weight, type (burning rate) of powder, and the expansion ratio of the firearm in question. Simple, it's not.
I have one of the old slide rule type "Powley Computer" around here somewhere. (I just moved and haven't completely unpacked; keep me in prayer.) There is a computerized version of it on line somewhere.
To speak to your .45 ACP using 230 bullets in a Government Model length (five inch) barrel; as long as one keeps to the same powder charge (type and weight of charge), then yes, barrel length can be linked to velocity. But that difference is based on the change in 'expansion ratio' which is the ratio of the unfired chamber (within the loaded cartridge) volume and the volume of the entire chamber and bore as the bullet leaves the barrel. In other words, a barrel twice as long does NOT give twice as much velocity.
There's a website called 'Ballistics by the Inch' wherein the operators have chronographed various calibers and various types of ammunition while cutting barrels off one inch at a time. That gives some very good general information on the process. A brief overview of the information shows all the calibers differ in change of velocity per inch. Still, it's a good source for estimating - not calculating - velocities of a known load.
Nor does the change in one inch of barrel for a .45 ACP equate to one inch of barrel for a .22-250 or a .30-06 or even a .458 Winchester.
I don't know if the slide rule type Powley Computer is available anymore. Too bad if it's not; one learns a great deal simply by seeing how different loads are determined by using the device.