Understanding the tank volume calculator — concept and principle
This calculator finds the total capacity of a tank and how much liquid is in it at a measured depth. It handles vertical and horizontal cylinders, rectangular tanks and capsule tanks with rounded ends. Use it for heating-oil tanks, water storage, rain tanks and fuel tanks when you can only dip a stick.
How it is calculated
- Cylinder capacity = π r² L; rectangular tank = width × length × height.
- Capsule capacity = π r² (L − 2r) + 4⁄3 π r³ (a cylinder plus a hemisphere at each end, L measured end to end).
- Vertical cylinder filled to depth h: π r² h.
- Horizontal cylinder filled to depth h: L × [r² arccos((r − h) ÷ r) − (r − h) √(2rh − h²)].
- Horizontal capsule: the straight part as above plus a spherical cap π h² (3r − h) ÷ 3 for the two ends together.
Sizes in cm give cm³; ÷ 1,000 gives litres. 1 US gallon = 3.785411784 L.
The principle
In an upright tank the cross-section is the same at every height, so volume rises in step with depth. A horizontal cylinder is different: its width changes with height, so the first and last few centimetres hold little and the middle holds the most. The bracket in the formula is the area of a circular segment, the part of a circle below a chord at depth h; multiplying by the length gives the liquid volume. Rounded ends add spherical caps: two half-spheres filled to the same depth together form one cap of a sphere.
Worked example
Default inputs: horizontal cylinder, diameter 120 cm, length 250 cm, liquid depth 45 cm.
- Radius r = 60 cm; capacity = π × 60² × 250 = 2,827,433 cm³ = 2,827.43 L (2.827 m³).
- Segment area = 60² × arccos(15 ÷ 60) − 15 × √(2 × 60 × 45 − 45²) = 3,600 × 1.3181 − 15 × 58.09 = 3,873.8 cm².
- Liquid = 3,873.8 × 250 ÷ 1,000 = 968.45 L, which is 255.84 US gallons.
- Fill level = 968.45 ÷ 2,827.43 = 34.3 %; space left = 1,858.98 L.
| Liquid depth, measured from the bottom (cm) | Liquid in the tank (litres) |
|---|---|
| 11.2 | 133.84 |
| 22.5 | 367 |
| 33.8 | 652.11 |
| 45 | 968.45 |
| 56.2 | 1,301.29 |
| 67.5 | 1,638.13 |
| 90 | 2,274.67 |
How to read the result
Notice that the tank is 37.5 % full by depth (45 of 120 cm) but only 34.3 % full by volume. Below half depth a horizontal tank always holds a smaller share than the depth suggests, and above half depth a larger share. Use the space left when ordering a delivery, and leave the headroom that the tank maker or supplier asks for.
Common mistakes
- Using outside dimensions instead of inside dimensions.
- Treating a horizontal tank as if volume were proportional to depth.
- Measuring a capsule's length without the rounded ends.
- Applying hemispherical ends to tanks with flatter dished ends.
Frequently asked questions
How do I measure the liquid depth?
Lower a clean dipstick straight down at the centre to the bottom and read the wet mark.
How many litres is a cubic metre?
Exactly 1,000 litres.
Why does a half-depth horizontal tank hold half its volume?
At exactly half depth the circle is cut through its centre, so the segment is exactly half the circle.
Sources: D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulas, 33rd ed. (2018), Geometry · NIST Special Publication 811 (1 US gallon = 3.785411784 L)