There are several different comparisons of gallons:
Nursery trade gallons versus standard gallons
Liquid gallons versus dry gallons capacity
U.S. gallons versus imperial gallons
When referring to gallons there are different capacity equations In the United States and other countries. A U.S. liquid gallon is defined as 231 cubic inches, which is about 3.785 liters. In the United Kingdom and Canada, a gallon equation is referred to as an imperial gallon. One Imperial gallon is equivalent to approximately 1.2 U.S. liquid gallons.
*Note when liquid gallons are used as reference to gallon size, they are the capacity of liquid that can be stored in that size, not the mass of the liquid itself.
The volume of liquid found in a container of milk for instance is much different than the volume of soil found in a nursery pot.
To confuse matters more the term 5-gallon nursery pot will vary between nursery pot suppliers depending on if they are manufacturing a standard 5 gallon, a squat 5 gallon, a tall 5 gallon or a tapered 5 gallon. Most horticultural pot companies refer to their sizes as #5 rather than a 5 gallon because of this.
Differences in Gallons themselves:
1 liquid U.S. gallon = 3.78541 liters
1 Imperial liquid gallon = 4.54609 liters
1 dry gallon = 4.40 liters
Another variation in what the inside dimensions are of a fabric hand sewn container versus a hard plastic (injection molded pot) is the fabric material is cut. When the fabric is sewn into a pot it will vary up to ½ an inch in the folding of the seams which will cause a variance in the dimensions, therefore creating slight differences in the volume of its contents.
Bottom line if you ever thought that a 1 gallon you get at a nursery with a perennial plant looks a lot smaller than a 1-gallon jug of milk, you were right! One is holding soil; the other is holding liquid and the two have a different conversion of volume.
A 1-gallon nursery pot may only really hold 0.664 gallons of soil.
A standard nursery trade gallon is approximately equal to 0.71 of a U.S. liquid gallon.
The gallon sizes in nursery containers should be considered approximate sizes. The best way to figure out which size container you will need is to check the dimensions.