How to Convert a Container Size to Gallons
Around the world, sizes of containers are measured by volume. However volume readings are either done according to the metric or imperial measurement system. The main volume unit in the metric system is liters, with the main volume unit in the imperial system being gallons.
Converting to gallons from other units requires a formula worked out from the equivalent volumes, which you can use to make the calculation.

Convert liters to U.S. gallons. Multiply the number of liters the container is by 0.26417. For example the formula for a 20 liter container's equivalent in U.S. gallons is 20 x 0.26417= 5.2834 U.S. gallons.

Convert cm3 to U.S. gallons. 1 liter is the equal of 10 cm3. So one cm3 is the equivalent of 0.000264172052 U.S. gallons. Multiply the amount of cm3 by this number to obtain an answer. So for 300 cm3 the equivalent volume in gallons would be 300 x 0.000264172052= 0.07925 U.S. gallons

Convert fluid ounces to U.S. gallons. Also an imperial measurement, one fluid ounce is the equivalent of 0.0078125 gallons. Multiply the amount of fluid ounces by this number to obtain the size in gallons. So 1000 fluid ounces works out as 1000 x 0.0078125= 7.8125 gallons.

Convert pints to U.S. gallons. One pint is equal to 0.125 U.S. gallons. Multiply 0.125 by the number of pints to obtain the size in gallons. For example to convert 25 pints into gallons: 25 x 0.125= 3.125 gallons.