The term you’re looking for is caliber.

Caliber describes:

  • The size of a rifle or handgun bore (the internal diameter of the barrel).
  • The size of the cartridges designed to be used in bores of that diameter.

For example, a “.270 caliber” rifle and “.270 caliber” ammunition are matched by this shared caliber designation.