The barrel length of a firearm includes the length of the barrel, plus the length of any permanently attached muzzle devices. So, if it is not permanently attached, it is not added to the length of the barrel.
Muzzle brakes are popular devices that are used to redirect muzzle gasses away from the shooter, in order to reduce recoil and muzzle climb. While they do provide some benefits, they also can add length to the barrel and thus increase the overall barrel length of a firearm.
You can watch how to measure pistol barrels here:
See also: the AmmoCave team picked up the best compensators for you!
Andy Larsson Answered question September 22, 2022