Gallon Calculator

Work out a volume in gallon (US)s from measured dimensions, for boxes, cylinders, tanks and more.

Only used by some shapes.
Clear
Volume179.5325 gallength x width x height
Litres679.604 l
Cubic metres0.6796 m³
Cubic feet24 ft³
US gallons179.53
ShapeBox / rectangular tankLength: 4 ft · Width: 3 ft · Height: 2 ft

The same volume in other units

UnitVolume
liter679.6043 l
milliliter679,604.32 ml
cubic meter0.679604 m³
cubic foot24 ft³
cubic yard0.888889 yd³
cubic inch41,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.