HomeEngineering & Automotive › Horizontal Tank Volume Calculator

Horizontal Tank Volume Calculator

Computes the liquid volume in a horizontal cylindrical tank from its diameter, length and the measured liquid depth, using the circular-segment area for flat ends and adding two spherical-cap segments for hemispherical ends, plus total capacity, fill percentage and remaining ullage.

When to use

You need to convert a dipstick or sight-glass reading on a horizontal fuel, water, oil or chemical tank into litres or gallons, or want the tank's total capacity.

Do not use when: The tank stands vertically or is rectangular (volume is simply area × depth; use cylinder or rectangular-prism), has dished or elliptical (2:1) heads, or is not level.

Formula

r = diameter_m / 2, h = liquid_level_m; segment area A = r² · acos((r − h) / r) − (r − h) · √(2·r·h − h²); cylinder liquid volume = A × length_m; hemispherical ends add π·h²·(3·r − h)/3 (a spherical cap of height h; the two half-spheres together form one sphere); total = π·r²·length_m (+ 4/3·π·r³ for hemispherical ends); fill_percent = liquid / total × 100

Exact geometry for a level tank with a true cylindrical shell; wall thickness, internal fittings and dished (torispherical or 2:1 elliptical) heads are not modelled, so hemispherical is an upper bound for domed heads. Volumes are geometric and do not account for thermal expansion of the liquid.

Inputs

ParameterTypeUnitRequiredDescription
diameter_mnumbermyesInternal diameter of the cylindrical shell in metres (1 ft = 0.3048 m, 1 in = 0.0254 m). Range: > 0, ≤ 100
length_mnumbermyesLength of the straight cylindrical section in metres, excluding the end caps. Range: > 0, ≤ 1000
liquid_level_mnumbermyesDepth of liquid measured vertically from the bottom of the tank, 0 to diameter_m. Range: ≥ 0, ≤ 100
end_typeenum: flat | hemisphericaldefault flatShape of the two end caps.

Outputs

OutputTypeUnitDescription
liquid_volume_m3numberVolume of liquid at the given level.
liquid_volume_litersnumberLLiquid volume in litres (1 m³ = 1000 L).
liquid_volume_gal_usnumbergal (US)Liquid volume in US gallons (1 gal = 3.785411784 L).
total_volume_m3numberVolume of the full tank including the end caps.
total_volume_litersnumberLFull-tank capacity in litres.
total_volume_gal_usnumbergal (US)Full-tank capacity in US gallons.
fill_percentnumber%liquid volume / total volume × 100.
empty_volume_litersnumberLVolume still available: total minus liquid.
level_percentnumber%liquid_level_m / diameter_m × 100 (the height fraction, which is not the volume fraction).

Example

2 m diameter, 5 m long, 0.5 m of liquid, flat ends: {"diameter_m":2,"length_m":5,"liquid_level_m":0.5,"end_type":"flat"}{"liquid_volume_m3":3.0709,"liquid_volume_liters":3070.9,"liquid_volume_gal_us":811.3,"total_volume_m3":15.708,"total_volume_liters":15708,"fill_percent":19.55,"empty_volume_liters":12637,"level_percent":25}

3 m diameter, 6 m shell, 2 m of liquid, hemispherical ends: {"diameter_m":3,"length_m":6,"liquid_level_m":2,"end_type":"hemispherical"}{"liquid_volume_m3":40.5082,"liquid_volume_liters":40508.2,"total_volume_m3":56.5487,"fill_percent":71.63,"level_percent":66.67}

GET https://tttkmbb.com/api/v1/calculate/horizontal-tank-volume?diameter_m=2&length_m=5&liquid_level_m=0.5&end_type=flat

Machine access

Sources

FAQ

Why is a half-full dipstick reading not 25 % of the volume at a quarter of the diameter?

The cross-section is a circle, so the volume per centimetre of depth is smallest near the bottom and top and largest at the centre; at 25 % of the diameter a flat-ended tank holds only about 19.6 % of its volume.

Does length_m include the end caps?

No. Enter the straight shell length; hemispherical heads add their own volume automatically (each head extends by the tank radius).

My tank has dished (torispherical) heads.

Dished heads hold less than hemispherical ones (roughly 8–10 % of the cylinder volume per pair of 2:1 elliptical heads on a tank with L = 2D). Use flat and hemispherical as lower and upper bounds, or the manufacturer's strapping chart.

Related calculators