A gun is a weapon that fires projectiles, usually bullets, often through a barrel. Guns vary in size and purpose from small arms, which can often be carried by individuals, through to guns which require a mount, up to large artillery. Guns are primarily, though not exclusively, used as weapons; guns are also used in sport - for hunting, target shooting and in athletics as a starter pistol.
In the context of artillery, a gun, as opposed to a howitzer or mortar, has a long barrel length with respect to its caliber. This gives the projectile a relatively flat trajectory, which is desirable in direct fire for anti-aircraft artillery or anti-tank warfare. A flat trajectory also gives maximum range for the caliber, as in naval guns and gunnery. Guided missiles can have much longer ranges than gun artillery and have replaced them in most military applications; the largest guns in common use are 5" naval weapons such as the 5"-62 caliber gun.