Well, it depends on what you mean. The caliber is "determined" at time of production based on whatever caliber the manufacturer wants it to be. The caliber can be determined later by looking on the barrel. The caliber will almost always be stamped somewhere on the barrel.
Chat with our AI personalities
It is the inside diameter of the bore inside the barrel.
Groove measurements (B) are common in designations originating in the United States, while land measurements (A) are more common elsewhere, but published values are often rounded or adjusted slightly when different manufactures have guns with identical calibers but incompatible chambering to prevent confusion.
An example of this is the .223 Remington cartridge used in the AR-15/M-16 which was a modification of the existing .222 Remington cartridge, both used the same .222 caliber bullet but incompatible cartridges and the AR-15/M-16 is actually a .222 caliber rifle (as are 22LR rifles also but they use much smaller cartridges and bullets).