Gallon Calculator
Work out a volume in gallon (US)s from measured dimensions, for boxes, cylinders, tanks and more.
The same volume in other units
| Unit | Volume |
|---|---|
| liter | 679.6043 l |
| milliliter | 679,604.32 ml |
| cubic meter | 0.679604 m³ |
| cubic foot | 24 ft³ |
| cubic yard | 0.888889 yd³ |
| cubic inch | 41,472 in³ |
| gallon (US) | 179.5325 gal |
| gallon (imperial) | 149.4921 gal |
The formulas
- Box:
V = length × width × height - Upright cylinder:
V = π r² h - Sphere:
V = 4/3 π r³ - Cone:
V = ⅓ π r² h— exactly a third of the cylinder that would enclose it - Capsule: a cylinder plus one whole sphere, since the two hemispherical ends make a sphere between them
A tank lying on its side
This is the one that is not intuitive. The volume of liquid is not proportional to the depth: a horizontal cylinder half full is exactly half its capacity, but a quarter of the depth is only about 19% of the volume, because the cross-section is widest in the middle. The calculation uses the area of the circular segment below the fill line.
Volumes and capacity
One cubic metre is exactly 1,000 litres, and one litre is exactly 1,000 cm³. The US and imperial gallons are different sizes — 3.785 l and 4.546 l — so a “gallon” tank means different things either side of the Atlantic.
For a real container, subtract the wall thickness: external dimensions overstate the usable capacity.