What is the formula for recoil velocity of the gun?

What is the formula for recoil velocity of the gun ?

After firing the bullet, the bullet moves forward with a large momentum and the gun moves backward with an equal momentum.

Let m and M be the masses of bullet and gun,respectively. If v and V are the velocities of the bullet and gun, respectively after the firing then:-

0= mv+ MV

Therefore V=-mv/M

The negative sign indicates that the gun moves in a direction to that of the bullet.