Multiply the kinetic energy of the bullet by two. If the energy is 1,000 Joules, for example, multiply 1,000 by 2 to get 2,000 J.
Divide the result by the mass of the bullet in kilograms. If the mass is 0.1 kg, divide 2,000 by 0.1 to get 20,000 J/kg, which equals 20,000 (m/s)^2.
Take the square root of the result to find the speed of the bullet. For example, the square root of 20,000 (m/s)^2 equals 141.4 m/s.
Divide the force the gun applies to the bullet by the mass of the bullet to get the acceleration. If the force is 1,000 Newtons and the mass is 0.1 kg, divide 1,000 by 0.1 to get 10,000 N/kg, which equals 10,000 m/s^2.
Multiply the acceleration by the length of the gun barrel. If the barrel is 0.5 m long, for example, multiply by 10,000 m/s^2 to get of 5,000 (m/s)^2.
Take the square root of the result to get the speed of the bullet. For example, the square root of 5,000 (m/s)^2 equals 70.7 m/s.