A simple thermodynamic model for projectile propulsion inside a rifle barrel results in a functional relationship between the muzzle speed of the rifle and its barrel length. This relationship is in excellent agreement with the existing experimental data over a wide range of barrel lengths.