Pick the tank's shape, enter its size, and optionally the depth of the liquid, to get the full and filled volume in gallons, liters and cubic feet.
Tank volume formulas
Vertical cylinder: V = π × r² × height
Horizontal cylinder: V = π × r² × length
Rectangle: V = length × width × height
Capsule (cylinder with round ends): V = π × r² × (length − 2r) + 4/3 × π × r³
r is half the diameter. Then convert: 1 cubic inch = 0.016387 liters, 1 cubic foot = 28.3168 liters = 7.48052 US gallons, and 1 US gallon = 3.78541 liters (NIST).
Partly filled horizontal tank
In a tank lying on its side, the liquid's end shape is a circular segment, so the volume isn't simply proportional to the depth. With liquid depth h:
Segment area A = r² × arccos((r − h) ÷ r) − (r − h) × √(2rh − h²)
Filled volume = A × length
The arccos is in radians. In a vertical cylinder or a rectangular tank the volume is simply proportional to the depth.
Worked example
A horizontal tank 48 in across and 72 in long: r = 24 in. Full: π × 24² × 72 = 130,288 cubic inches × 0.016387 = 2,135 liters, or 564.0 gallons.
With 12 in of liquid: arccos((24 − 12) ÷ 24) = arccos(0.5) = 1.0472 rad. A = 576 × 1.0472 − 12 × √(576 − 144) = 603.19 − 249.42 = 353.77 sq in. × 72 = 25,471 cubic inches = 110.3 gallons. That's only 19.6% of the tank at a quarter of the depth, because the bottom of the circle is narrow.
Getting a realistic number
- Use inside dimensions. Outside measurements include the wall thickness.
- Real tank ends are often dished or elliptical rather than flat or half spheres, which changes the volume a little. The maker's data plate or chart is the final word.
- Fuel and oil tanks are often sold by nominal size; a "275 gallon" oil tank is not a cylinder, and usable volume is less than total volume.
Sources
How we checked this
Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:
- Horizontal 48 × 72 in cylinder: 564.0 gallons ✓
- Same tank with 12 in of liquid (circular segment): 110.3 gallons ✓
- Vertical cylinder 10 ft across, 10 ft tall: 5,875.2 gallons ✓
- Rectangle 4 × 3 × 2 ft: 179.5 gallons ✓
- Capsule 2 ft across, 6 ft long: 125.3 gallons ✓
- Edge: 50 in of liquid in a 48 in tank is refused ✓
Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.
Questions people ask
How many gallons are in a 48 × 72 inch tank?
A cylinder 48 in in diameter and 72 in long holds about 564 gallons (2,135 liters).
How do I calculate gallons in a horizontal tank?
Full: π × r² × length, converted to gallons. Partly full: use the circular segment area for the liquid depth, times the length, which this calculator does.
How many gallons in a cubic foot?
7.48052 US gallons, or 28.3168 liters.
How many gallons in a cubic inch?
1 ÷ 231, or 0.004329 US gallons. A US gallon is defined as 231 cubic inches.
Is half the depth half the volume?
Yes for a horizontal cylinder at exactly half the diameter, by symmetry. Below the middle there's less than the depth suggests; above it, more.