Recent posts here at YFGF have examined English cask measurements and bourbon barrel volumes. Now, let's look at some standard US beer measurements.
For ease of conversion, many breweries measure their annual output in case equivalents, that is, as if everything the brewery produced were in cases of 24 12-ounce bottles. One case equals one case equivalent. The jargon acronym is CE.
One US barrel -31 gallons— is the equivalent of 13.78 case equivalents. The standard size for a US keg is 1/2 barrel —in other words, 15.5 US gallons— which is the equivalent of 6.89 CEs. At the bar, the standard half-barrel keg yields 124 US pints (that is, if the bar is using 'honest pint' glasses of 16 US fluid ounces).
Keep in mind that 'barrel' in this sense is a unit of measurement: 31 gallons. It is not a physical container. (That does not apply to barrels of wine or barrels of whiskey, which, of course, do physically exist, but are of different sizes.)
There are are other sizes of kegs. A European standard keg is 50 liters, which is approximately 13.2 US gallons. Bars with less cooler space may utilize sixtels —that is, kegs of 1/6th barrel in volume, or 5.16 gallons. For more volume equivalents, click on the graphic.