What this calculator does
The Tank Volume & Fill Calculator computes two numbers for a storage tank: the total capacity when it is completely full, and the filled volume of liquid when it is partly full to a measured depth. It supports seven common shapes - horizontal cylinder, vertical cylinder, rectangle (box), horizontal and vertical oval (stadium cross-section), and horizontal and vertical capsule (a cylinder with hemispherical end caps). This is pure geometry, so it works anywhere in the world; the only regional detail is that results are shown in both U.S. and Imperial gallons side by side, plus liters, cubic meters, U.S. quarts and cubic feet.
How to use it
Pick the tank type, then enter the dimensions that apply to that shape. Each dimension has its own unit dropdown (inches, feet, yards, millimeters, centimeters or meters), so you can mix units freely - the calculator converts everything to meters internally. For cylinders and capsules, "Length (l)" is the axial length and "Diameter (d)" is the circle size; for capsules the length is the straight mid-section (the caps are added on top). For rectangles use length, width and height. For oval tanks, width is the long overall dimension and must be at least equal to the diameter. Finally, enter an optional "Filled Depth (f)" measured vertically from the bottom of the tank to see how much liquid is currently inside.
The formula explained
A full horizontal cylinder holds $$V = \pi r^2 l$$ When it is only partly full, the liquid forms a circular segment whose cross-sectional area is \(r^2\cdot\arccos\!\frac{r-f}{r} - (r-f)\cdot\sqrt{2rf - f^2}\); multiplying that area by the length gives the filled volume: $$V_f = \left[r^2\arccos\!\frac{r-f}{r} - (r-f)\sqrt{2rf - f^2}\right] l$$ Vertical tanks fill as a simple shorter prism, rectangles as \(\text{length} \times \text{width} \times \text{depth}\), and capsules add a partial spherical cap volume \(\frac{\pi f^2(3r - f)}{3}\) for the rounded ends.
Worked example
A horizontal cylinder 10 ft long and 6 ft in diameter, filled to 3 ft (exactly half). Full capacity = $$\pi \times 3^2 \times 10 = 282.74 \text{ ft}^3 \approx 2{,}115 \text{ U.S. gallons } (8{,}006 \text{ liters})$$ At half depth the segment area equals half the circle, so the filled volume is exactly half: \(141.37 \text{ ft}^3 \approx 1{,}058\) U.S. gallons.
FAQ
What is the difference between U.S. and Imperial gallons? One Imperial gallon is about 1.201 U.S. gallons, so the Imperial figure is always smaller for the same volume.
Where do I measure the fill depth? Straight down from the very bottom of the tank to the liquid surface, in the same orientation the tank actually sits.
Why are oval and capsule results approximate? They use exact stadium and spherical-cap geometry; real tanks may have weld seams, wall thickness or non-standard end caps that slightly change capacity.