What the animation shows
The animation and the step-by-step video above use your numbers. Here is the same walkthrough written out for the default example.

What you enter
- Tank shape: Horizontal cylinder.
- Inside diameter: 48 in. Used for cylinder tanks. Measure inside, or subtract twice the wall thickness from the outside diameter.
- Length: 72 in. Horizontal cylinder or rectangular tank length (end to end, inside).
- I know the liquid depth: Yes.
- Liquid depth (from the bottom): 18 in. A dipstick reading measured from the inside bottom of the tank.
What happens, step by step
- Full, the tank holds π × r² × length: 564 gal.
- Liquid flows in at a steady rate. Watch the level near the bottom.
- The tank is widest in the middle, so the level climbs slower there.
- At 18 in deep the end view is a circular segment.
- That is 193.2 gal, 34.3% of the tank.
The answer: liquid in the tank is 193.2 gal.
How it’s calculated
- Vertical cylinder: volume = π ÷ 4 × diameter² × height; liquid = π ÷ 4 × diameter² × depth
- Rectangular: volume = length × width × height; liquid = length × width × depth
- Horizontal cylinder: volume = π × r² × length, with r = diameter ÷ 2
- Horizontal cylinder liquid = length × [r² × acos((r − h) ÷ r) − (r − h) × √(2rh − h²)], with h = liquid depth
- Gallons = cubic inches ÷ 231 (or cubic feet × 7.4805); liters = gallons × 3.7854
Worked example
A horizontal tank 48 in in diameter and 72 in long with 18 in of liquid.
Inputs
- Tank shape
- Horizontal cylinder
- Inside diameter
- 48 in
- Length
- 72 in
- Width
- 36 in
- Height
- 60 in
- I know the liquid depth
- Yes
- Liquid depth (from the bottom)
- 18 in
Results
- Total tank capacity
- 564 gal
- Liquid in the tank
- 193.2 gal
- Percent full
- 34.3%
- Room left to fill
- 370.8 gal
- Gallons per inch of depth at this level
- 14.49 gal/in
Assumptions and limits
- Inside dimensions. Wall thickness, internal baffles, fittings and dished or elliptical heads are not included.
- The tank is level. A tilted horizontal tank reads high or low at the dipstick.
- Oil tanks sold as “275 gallon” are obround (flat sides, round ends), not true cylinders — use the maker’s tank chart for those.
Verify the result against the applicable local code, adopted code edition, manufacturer instructions and project requirements. See our methodology.
Questions
How do you calculate gallons in a horizontal tank?
Full: π × r² × length in cubic inches ÷ 231. A 48 in × 72 in tank holds π × 24² × 72 = 130,288 in³ = 564 gal. For a partial fill, multiply the circular-segment area at the liquid depth by the length.
Is a horizontal tank half full when the gauge reads half?
At exactly half the diameter, yes. Everywhere else, no: at a quarter of the diameter a horizontal cylinder is only 19.6% full, and at three quarters it is 80.4% full, because the tank is widest in the middle.
How many gallons are in a cubic foot?
7.4805 US gallons, since one gallon is exactly 231 cubic inches and a cubic foot is 1,728 cubic inches.
How many gallons per inch is my vertical tank?
For a vertical cylinder it is constant: π ÷ 4 × diameter² ÷ 231. A 48 in diameter tank holds 1,809.6 ÷ 231 = 7.83 gal per inch of depth.