Home › Engineering & 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
diameter_m | number | m | yes | Internal diameter of the cylindrical shell in metres (1 ft = 0.3048 m, 1 in = 0.0254 m). Range: > 0, ≤ 100 |
length_m | number | m | yes | Length of the straight cylindrical section in metres, excluding the end caps. Range: > 0, ≤ 1000 |
liquid_level_m | number | m | yes | Depth of liquid measured vertically from the bottom of the tank, 0 to diameter_m. Range: ≥ 0, ≤ 100 |
end_type | enum: flat | hemispherical | default flat | Shape of the two end caps. |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
liquid_volume_m3 | number | m³ | Volume of liquid at the given level. |
liquid_volume_liters | number | L | Liquid volume in litres (1 m³ = 1000 L). |
liquid_volume_gal_us | number | gal (US) | Liquid volume in US gallons (1 gal = 3.785411784 L). |
total_volume_m3 | number | m³ | Volume of the full tank including the end caps. |
total_volume_liters | number | L | Full-tank capacity in litres. |
total_volume_gal_us | number | gal (US) | Full-tank capacity in US gallons. |
fill_percent | number | % | liquid volume / total volume × 100. |
empty_volume_liters | number | L | Volume still available: total minus liquid. |
level_percent | number | % | 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
- API:
GET https://tttkmbb.com/api/v1/calculate/horizontal-tank-volume(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/horizontal-tank-volume · Markdown: https://tttkmbb.com/engineering/horizontal-tank-volume.md · JSON definition: https://tttkmbb.com/engineering/horizontal-tank-volume.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="horizontal-tank-volume" - OpenAPI operationId:
calculate_horizontal_tank_volume - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Circular segment (reference)
- Wikipedia – Spherical cap (reference)
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
- Cylinder Calculator — Volume and surface area of a full cylinder.
- Circle Sector and Segment Calculator — Area of the circular sector and segment used here.
- Pipe Flow Calculator (Hazen–Williams) — Flow and pressure drop in the pipe filling or draining the tank.