Recoil (often called knockback, kickback or simply kick) is the backward momentum of a gun when it is discharged. In technical terms, the recoil caused by the gun exactly balances the forward momentum of the projectile and exhaust gases (ejecta), according to Newton's third law. In most small arms, the momentum is transferred to the ground through the body of the shooter; while in heavier guns such as mounted machine guns or cannons, the momentum is transferred to the ground through its mount. In order to bring the gun to a halt, a forward counter-recoil force must be applied to the gun over a period of time. Generally, the counter-recoil force is smaller than the recoil force, and is applied over a time period that is longer than the time that the recoil force is being applied (i.e. the time during which the ejecta are still in the barrel of the gun). This imbalance of forces causes the gun to move backward until it is motionless.
A change in momentum results in a force, which according to Newton's second law is equal to the time derivative of the momentum of the gun. The momentum is equal to the mass of the gun multiplied by its velocity. This backward momentum is equal in magnitude, by the law of conservation of momentum, to the forward momentum of the ejecta (projectile(s), wad, propellant gases, etc...) from the gun. If the mass and velocity of the ejecta are known, it is possible to calculate a gun’s momentum and thus the energy. In practice, it is often simpler to derive the gun’s energy directly with a reading from a ballistic pendulum or ballistic chronograph.