When referring to projectile weapons, the term caliber (US; UK calibre), somewhat confusingly, refers to projectile weapons in two ways:
The inside diameter measurement is used for both small arms (e.g., rifles, pistols, etc.) and for larger artillery. While all militaries have gone to metric measurements for the caliber of new weapons, in English-speaking countries, it is still common to find the calibers of small arms expressed in decimal fractions of an inch:
Weapons first developed under a metric system may acquire a decimal designation as well, such as 9mm pistol ammunition being called .380.
A smaller caliber bullet such as .22, as opposed to .38 just for example, contains less gunpowder and thus might seem to be less dangerous to living creatures. But this is not necessarily the case. The smaller .22 caliber bullet of pistols and rifles exits the barrel at a lower speed than .38 bullets, and its lead shot thus spreads out in air pressure to a wide blob (perhaps 1"). This would tear a huge hole in living flesh. In contrast, a .38 caliber bullet is traveling much faster and its lead shot pierces the air without spreading, so that is more likely to make a neat hole through living tissue. This means that a .22 caliber weapon would likely be more dangerous than a higher caliber weapon, especially in close quarters. Thus, it is important not to underestimate the dangers even from small-caliber guns.
To complicate matters, shotguns are most often referred to by "gauge", or the number of lead ball projectiles, in a single round, that would weigh one pound. 10 gauge shotguns have the largest calibers of shotguns in common use, at a very wide .775 inch, and 12 gauge = .729 inch. Shotguns chambered for .410 ammunition, are being described with respect to caliber alone.
Barrel length in calibers is used only with respect to artillery and naval guns. For example, the American Iowa-class battleships had 16" 50 caliber guns; barrel length was 16x50 = 800 inches.
While the diameter measurement is now the most common measurement, until the Second World War, and especially during the days of sail, cannon were described in terms of the weight of their projectile, a 32 pounder being a heavy gun on a ship of the line. Those were spherical projectiles, and both the change in shape to the streamlined bullet, as well as high explosive filler, made "pound" notation hard to compare.
In WWII, the 2-pounder was a 40mm, the 6-Pounder was 57mm.The 17-Pounder was 76.2mm. The 77mm gun was actually 76.2mm. It fired the same projectile as the 17-Pounder but used a less powerful charge.