The M4 is a gas-operated, shoulder-fired weapon. The cartridges are fed into the gun with a magazine, which is a rectangular box that holds the cartridges. It has a stock that can be extended or pushed in and a 14.5 in (370 mm) barrel to make it easier for soldiers to use the weapon in confined spaces. Like the other rifles in the M16 family, it fires the .223 caliber, or 5.56mm NATO round.