Calculate the volume of a cylindrical tank or container in gallons, cubic feet, and liters from its diameter and height.
volume = π × (diameter ÷ 2)² × height
A cylinder's volume is pi times the radius squared times the height. One cubic foot holds about 7.48 US gallons.
For a partially filled horizontal tank the math is more complex — this covers a full vertical cylinder.
A cylindrical tank 4 ft in diameter and 6 ft tall has a volume of π x (2 ft)² x 6 ft = 75.4 cubic feet. At 7.48 gallons per cubic foot, that's about 564 gallons, or roughly 2,135 liters.
This is for a full vertical cylinder. A horizontal tank that's partially full needs a more complex partial-cylinder calculation, and tanks with domed or coned ends add volume at the ends. For those, treat this as the straight-side volume and add the end caps separately.
Exact geometry. One cubic foot is 7.48 US gallons; one US gallon is 3.785 liters.
About 564 gallons for a 4 ft diameter, 6 ft tall cylinder.