# What is my tank volume?

Finds the capacity of a horizontal or vertical cylinder, rectangular, capsule, or oval tank in gallons or litres, and the volume of liquid at a fill height.

- Page: https://www.acalculator.org/math/tank-volume-calculator
- JSON spec: https://www.acalculator.org/math/tank-volume-calculator.json
- Version: 803bdfd2e5a1

## Default answer

Example with the default inputs (Tank shape Horizontal cylinder, Diameter 48 in, Length 120 in, Fill height 36 in): The tank holds 940.03 gal when full, and 756.25 gal at a fill height of 36 in.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| shape | Tank shape | The shape of the tank and which way it lies. |
| d | Diameter | The inside diameter of the round tank. |
| length | Length | The inside length of the tank; for a capsule, the straight part only. |
| w | Width | The inside width of the tank. |
| h | Height | The inside height of the tank. |
| fill | Fill height | The depth of the liquid, measured from the bottom of the tank. Leave it empty for the capacity only. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| total | Tank capacity | The volume of the whole tank when full. |
| filled | Filled volume | The volume of liquid at the fill height. |
| empty | Space left | The capacity minus the filled volume. |
| percent | Percent full | The filled volume as a percent of the capacity. |
| percentEmpty | Percent empty | The space left as a percent of the capacity: 100% minus the percent full. |

## Method

Capacity from the tank shape (πr²L for a cylinder, l × w × h for a box, plus 4/3 πr³ for capsule ends); a part-full round tank uses the circular segment area r²(θ − sin θ) ÷ 2.

## Assumptions

- Dimensions are inside measurements, and the tank is level.
- A capsule has half-sphere ends as wide as its diameter; its length is the straight part only.
- Volumes show in US gallons (231 in³), or litres in Metric.

## Worked examples

1. shape = hcyl, d = 1.2192, length = 3.048, fill = 0.9144 gives total = 3.5584, filled = 2.862729, percent = 80.449889%. Source: NIST Handbook 44, Appendix C, 1 US gallon = 231 in³ (https://www.nist.gov/pml/owm/nist-handbook-44-current-edition); Weisstein, MathWorld, circular segment area (https://mathworld.wolfram.com/CircularSegment.html).
2. shape = vcyl, d = 1, h = 2, fill = 1.5 gives total = 1.570796, filled = 1.178097, percent = 75%.
3. shape = rect, length = 2, w = 1, h = 1.5, fill = 0.75 gives total = 3, filled = 1.5, empty = 1.5, percent = 50%.
4. shape = hcap, d = 2, length = 3, fill = 1 gives total = 13.613568, filled = 6.806784, percent = 50%.
5. shape = vcap, d = 2, length = 3, fill = 4 gives total = 13.613568, filled = 11.519173.
6. shape = hoval, w = 2, h = 1, length = 4, fill = 0.5 gives total = 6.283185, filled = 3.141593, percent = 50%.
7. shape = hcyl, d = 1, length = 1 gives total = 0.785398.

## FAQ

### How do I calculate the volume of a cylindrical tank?

Multiply π by the radius squared and by the length (or height): V = πr²L. A tank 48 in across and 120 in long has r = 24 in, so V = π × 576 × 120 = 217,147 in³, which is 940.03 US gallons (231 in³ per gallon).

### How do I find the volume of liquid in a horizontal tank?

The liquid fills a circular segment along the length. Its area is r² arccos((r − f) ÷ r) − (r − f)√(2rf − f²), where f is the liquid depth; multiply by the length. The same 48 × 120 in tank filled to 36 in holds 756.25 gallons, which is 80.4% of its capacity even though the depth is 75% of the diameter.

### Why is a horizontal tank at half height exactly half full, but not at other heights?

The circle is widest in the middle. Below the middle each inch of depth adds less liquid than an inch near the middle, so a quarter-depth tank is only about 19.6% full. At exactly half the diameter the two halves are equal, so it is 50% full.

### How do I measure a capsule tank?

Measure the diameter and the length of the straight (cylinder) part only. The two round ends together make one sphere of the same diameter, which the calculator adds: V = πr²L + 4/3 πr³.

### How many litres are in a US gallon?

One US gallon is 231 cubic inches, which is exactly 3.785411784 litres. Switch the site to Metric to see the answers in litres. The UK (imperial) gallon is larger, about 4.546 litres.

### What if my tank has dished or cone-shaped ends?

This calculator covers flat, half-sphere (capsule), and oval tanks. For dished heads or a cone bottom, the answer from the closest shape is only an estimate; the tank maker’s chart is the best source.

### Why is my measured volume a little less than the calculator's?

The calculator uses inside measurements and a perfectly level tank. Wall thickness, fittings, a slope, or dents all reduce the real volume. Use inside measurements, or subtract twice the wall thickness from outside measurements.

## Sources

- NIST Handbook 44 (2024), Appendix C, General Tables of Units of Measurement (1 US gallon = 231 in³ = 3.785411784 L). https://www.nist.gov/pml/owm/nist-handbook-44-current-edition
- NIST Digital Library of Mathematical Functions, §4.23 Inverse Trigonometric Functions (arcsin, arccos). https://dlmf.nist.gov/4.23
- OpenStax, Calculus Volume 1, §6.2 Determining Volumes by Slicing (cross-section area times length; sphere volume). https://openstax.org/books/calculus-volume-1/pages/6-2-determining-volumes-by-slicing
- Weisstein, Eric W. "Circular Segment" and "Spherical Cap", MathWorld (segment area r²(θ − sin θ)/2, cap volume πh²(3r − h)/3). https://mathworld.wolfram.com/CircularSegment.html
