What is the Horizontal Cylindrical Tank Volume Calculator?
This tool calculates how much liquid is inside a horizontal cylindrical tank — the common shape of fuel tanks, water cisterns, propane tanks and chemical storage drums lying on their side. Because the tank lies horizontally, the liquid surface forms a flat chord across the circular cross-section, so the filled area is a circular segment. The volume is that segment area multiplied by the tank length.
How to use it
Enter the tank diameter, the tank length (the long horizontal dimension), and the liquid height measured vertically from the bottom of the tank. Pick a length unit. The calculator returns the partial-fill volume in cubic units, the percentage full, the full-tank capacity, and converts the result to liters and US gallons. To get the full tank capacity, set the liquid height equal to the diameter.
The formula explained
For a full tank the volume is simply \(V = \pi \cdot r^{2} \cdot L\). For a partial fill to height \(h\), the cross-sectional area of the liquid is a circular segment:
$$V = L\left[\,r^{2}\cos^{-1}\!\left(\frac{r-h}{r}\right) - (r-h)\sqrt{2rh-h^{2}}\,\right]$$where r is the radius (diameter \(\div\) 2). When \(h = r\) (half full) the inverse cosine equals \(\pi/2\) and the volume is exactly half the full tank, as expected.
Worked example
Diameter = 2 m so \(r = 1\) m, length \(L = 5\) m, liquid height \(h = 1\) m (exactly half full). Since \(h = r\), the formula gives $$V = 5\cdot\left(1^{2}\cdot\cos^{-1}(0) - 0\cdot\sqrt{(\ldots)}\right) = 5\cdot(1\cdot 1.5708) = 7.854 \text{ m}^{3}.$$ The full tank holds \(\pi \cdot 1^{2} \cdot 5 = 15.708\) m³, so we are at 50% — correct for a half-full tank. That's 7,854 liters or about 2,074 US gallons.
Fill Height vs. Volume Reference Chart (Dipstick Table)
For a horizontal cylinder with flat ends, the filled fraction of the tank depends on only one dimensionless quantity: the fill ratio \(x = h/D\), where \(h\) is the liquid depth measured from the lowest point of the inside of the shell and \(D\) is the inside diameter. Writing \(r = D/2\) and substituting \(h = 2rx\) into the circular-segment volume formula, the tank length \(L\) and the radius \(r\) cancel out completely:
$$\frac{V}{V_{\text{full}}} = \frac{\cos^{-1}(1-2x) - 2(1-2x)\sqrt{x(1-x)}}{\pi}$$The middle column below is that universal ratio. The right-hand column is one illustration only — a tank of inside diameter 2 m and length 5 m, whose full capacity is \(\pi r^{2} L = \pi (1\ \text{m})^{2}(5\ \text{m}) = 15.708\ \text{m}^{3}\) (15,708 litres).
| Fill ratio \(h/D\) | Percent of full volume | Volume in a 2 m × 5 m tank (m³) |
|---|---|---|
| 0.05 | 1.87% | 0.294 |
| 0.10 | 5.20% | 0.817 |
| 0.15 | 9.41% | 1.477 |
| 0.20 | 14.24% | 2.236 |
| 0.25 | 19.55% | 3.070 |
| 0.30 | 25.23% | 3.963 |
| 0.35 | 31.19% | 4.900 |
| 0.40 | 37.35% | 5.867 |
| 0.45 | 43.64% | 6.856 |
| 0.50 | 50.00% | 7.854 |
| 0.55 | 56.36% | 8.852 |
| 0.60 | 62.65% | 9.841 |
| 0.65 | 68.81% | 10.808 |
| 0.70 | 74.77% | 11.745 |
| 0.75 | 80.45% | 12.638 |
| 0.80 | 85.76% | 13.471 |
| 0.85 | 90.59% | 14.230 |
| 0.90 | 94.80% | 14.891 |
| 0.95 | 98.13% | 15.414 |
| 1.00 | 100.00% | 15.708 |
Note — the percentages are pure geometry. They are independent of tank length and of tank diameter, so the same column applies to a 500-litre air receiver and a 50,000-litre road tanker barrel alike. Multiply the percentage by your own tank's full capacity to get a volume. The table is also symmetric about the half-full line: the percentage at \(h/D = x\) and at \(h/D = 1-x\) always add to 100% (for example 19.55% + 80.45% = 100%).
Two practical cautions. First, the chart assumes a true cylinder with flat ends; tanks with dished, elliptical or hemispherical heads hold more than \(\pi r^{2} L\), and the extra volume in the heads does not fill in the same proportion as the shell, so a flat-end dipstick table will under-read on such a tank. Second, \(h\) must be the liquid depth inside the shell, not the length of a dipstick that passes through a raised fill neck or includes wall thickness.
How to Calculate Horizontal Tank Volume by Hand
The partial-fill volume of a horizontal cylinder is the area of a circular segment multiplied by the length of the tank:
$$V = L\left[\,r^{2}\cos^{-1}\!\left(\frac{r-h}{r}\right) - (r-h)\sqrt{2rh-h^{2}}\,\right]$$Work through it in this order, keeping every length in the same unit (all metres, all centimetres, all feet or all inches — the same choice you make in the calculator's unit selector). The worked numbers below are for a tank of inside diameter \(D = 2\) m, length \(L = 5\) m, filled to a depth of \(h = 0.6\) m.
- Halve the diameter to get the radius. \(r = D/2 = 2 \div 2 = 1\) m.
- Form the ratio \((r-h)/r\). \((1 - 0.6) \div 1 = 0.4\). This number is always between \(-1\) and \(+1\); if it falls outside that range, your \(h\) is not a valid depth.
- Take the inverse cosine in RADIANS. \(\cos^{-1}(0.4) = 1.159280\) rad. If your calculator is locked in degree mode it will return \(66.4218^\circ\); divide by \(57.2958\) (that is \(180/\pi\)) to convert: \(66.4218 \div 57.2958 = 1.159280\) rad. Using degrees directly is the single most common error here and inflates the answer by a factor of about 57.
- Multiply by \(r^{2}\). \(1^{2} \times 1.159280 = 1.159280\) m².
- Compute the chord term \((r-h)\sqrt{2rh-h^{2}}\). First the radicand: \(2 \times 1 \times 0.6 - 0.6^{2} = 1.2 - 0.36 = 0.84\), so \(\sqrt{0.84} = 0.916515\) m. Then \((r-h) = 1 - 0.6 = 0.4\) m, giving \(0.4 \times 0.916515 = 0.366606\) m².
- Subtract. \(1.159280 - 0.366606 = 0.792674\) m² — this is the wetted cross-sectional area of the segment.
- Multiply by the length \(L\). \(0.792674 \times 5 = \) 3.9634 m³.
- Convert to the unit you actually need. 1 m³ = 1000 litres, so \(3.9634\ \text{m}^{3} = 3963.4\) litres. For US liquid gallons multiply cubic metres by 264.1721: \(3.9634 \times 264.1721 = 1047.0\) US gal. (If you worked in centimetres, divide cm³ by 1000 for litres; if you worked in feet, multiply ft³ by 7.48052 for US gallons, or by 28.3168 for litres; cubic inches × 0.0043290 gives US gallons.) Note that the gallon here is the US liquid gallon — an imperial gallon, still used in the UK, is about 20% larger, at 219.969 imperial gallons per cubic metre.
As a sanity check, \(h/D = 0.6/2 = 0.30\), and the dipstick chart above gives 25.23% of full. Full capacity is \(\pi \times 1^{2} \times 5 = 15.708\) m³, and \(0.2523 \times 15.708 = 3.963\) m³ — the same answer.
Sign caution and edge cases
- \((r-h)\) goes negative above the half-full line. When \(h > r\), the term \(r-h\) is negative, so step 5 produces a negative number and step 6 adds its magnitude instead of removing it. Keep the minus sign — do not take an absolute value. For example with \(h = 1.4\) m in the same tank: \((r-h)/r = -0.4\), \(\cos^{-1}(-0.4) = 1.982313\) rad, \(\sqrt{2(1)(1.4)-1.4^{2}} = \sqrt{0.84} = 0.916515\), and \((-0.4)(0.916515) = -0.366606\), so the area is \(1.982313 - (-0.366606) = 2.348919\) m² and \(V = 11.745\) m³ — correctly 74.77% full, the complement of the 25.23% case.
- Your calculator must accept a negative arccos argument. \(\cos^{-1}\) of a negative value returns an angle between \(\pi/2\) and \(\pi\) radians (90° to 180°); a result above \(\pi/2\) is normal and expected for a more-than-half-full tank.
- \(h \ge D\): the tank is full. The formula is only defined for \(0 \le h \le D\). At exactly \(h = D\) the square-root term vanishes and \(\cos^{-1}(-1) = \pi\), so it correctly reduces to \(V = \pi r^{2} L\). For any reported depth greater than \(D\), clamp to \(h = D\) and report full capacity rather than extrapolating — a dipstick reading above the shell usually means the tank has a riser or the diameter entered is wrong.
- \(h \le 0\): the volume is zero. At \(h = 0\), \(\cos^{-1}(1) = 0\) and the radicand is 0, so \(V = 0\). A negative depth has no physical meaning and will put the arccos argument outside \([-1, 1]\), returning a domain error.
- Precision matters near empty and near full. Around \(h/D \approx 0.5\) the volume changes almost linearly with depth, but near the top and bottom of the shell the curve is very flat, so a few millimetres of dipstick error translates into a much smaller volume error there — and conversely, rounding \(\cos^{-1}\) to only two or three decimals can visibly distort the result. Carry at least six significant figures through steps 3–6.
FAQ
What units should I use? Use any consistent length unit for diameter, length and height; the calculator converts the volume to liters and gallons automatically.
What if the height exceeds the diameter? The height is capped at the diameter, returning the full-tank volume.
Does this work for vertical tanks? No — a vertical cylinder uses \(V = \pi \cdot r^{2} \cdot h\). This tool is specifically for tanks lying on their side.