Find the volume of a cylinder, tank, drum or container — vertical or horizontal, with flat, hemispherical or 2:1 elliptical ends, full or partially full — plus hollow tubes, oval tanks, cones and spheres. Every result in US gallons, UK gallons, litres, cubic metres, cubic feet, cubic inches and cubic yards at once. Enter your own dimensions; nothing is stored and nothing is sent anywhere.
Vertical cylinder — V = (π/4) d² h
A vertical cylinder has a constant cross-section, so liquid volume scales straight with liquid height.
End-cap type
Horizontal cylinder / tank
Depth is non-linear: 50% depth is exactly 50% volume, but a quarter-deep tank holds far less than a quarter.
Hollow cylinder / tube / annulus — V = (π/4)(D² − d²) h
This is the ring of material (or jacket space) between the two diameters. For the water a plumbing pipe holds, use the pipe volume calculator.
Oval (elliptical cross-section) tank — V = π a b L
Full volume only. Partial fill is supported for circular cross-sections (the Horizontal tab), not oval ones.
Cone — V = (1/3) π r² h
A cone is one-third of the cylinder that would contain it — useful for hopper and conical tank bottoms.
Sphere — V = (4/3) π r³
Two hemispherical tank heads together make one sphere, so this doubles as a check on hemispherical ends.
[ Ad slot — replace with AdSense / Ezoic code ]
For plumbing pipe instead
This tool owns tanks, drums and general containers. For the water a plumbing pipe holds — bore and run length to gallons or litres, including horizontal partial fill across several runs — use the pipe volume calculator.
The cylinder volume formula
The volume of a cylinder is the area of its circular face times its length, and the cylinder volume formula people reach for is V = π r² h, with r the radius and h the height. If you have the diameter instead, the same circular volume formula is V = (π ÷ 4) d² h, because the radius is half the diameter. That is the whole formula for calculating the volume of a cylinder — a cylindrical volume calculation is just a circle area carried along a length. Keep the radius and height in the same units and the raw answer is in that unit cubed, which the calculator converts into every capacity unit for you. This one formula handles a vertical tank, a barrel on end, or any straight round container.
Tank capacity in gallons and litres
Once you have a volume in one unit, the conversions to capacity are exact — no rounding:
From
Equals
1 US gallon
231 cubic inches
1 UK (imperial) gallon
277.4194 cubic inches
1 cubic foot
1728 cubic inches
1 cubic yard
27 cubic feet
1 cubic inch
16.387064 cubic centimetres
1 litre
1000 cubic centimetres
1 cubic metre
1,000,000 cubic centimetres
The catch most people meet is that a US gallon and a UK gallon are different sizes — the imperial gallon is about 20 % larger — so this circular tank capacity calculator always shows both, alongside litres, cubic metres, cubic feet, cubic inches and cubic yards. Want to know the cubic yards in a cylinder, or how many gallons in a cylinder of a given size? Enter the diameter and height and read every figure at once.
Horizontal tanks and partial fill
A horizontal cylinder is where the simple calculators go wrong. Because the cross-section is a circle, the volume does not grow evenly with depth: at the bottom each inch adds a thin sliver, the area grows fastest through the middle, then tapers near the top. The volume of a horizontal cylinder tank, partly full to a liquid depth h, comes from the area of the circular segment the liquid fills:
r = d ÷ 2 A = r² · arccos((r − h) ÷ r) − (r − h) · √(2rh − h²) Vshell = A × L
so a half-full (centreline) tank holds exactly half, but a quarter-deep tank holds far less than a quarter. The horizontal tank volume calculator here applies that segment area directly and reports the liquid volume, the total capacity, the percent full and the ullage (the empty space above the liquid).
End caps: flat, hemispherical and elliptical
Curved heads stick out past the straight shell and add real capacity that flat-end calculators miss. For both ends combined at liquid depth h:
Two hemispherical heads together make a full sphere, adding about a third of the shell volume; two 2:1 semi-elliptical heads add about a sixth. Pick the head type and the tool folds the matching filled portion of the ends into both the capacity and the partial-fill reading. This covers the drum volume, the hemispherical-end and elliptical-tank cases people search for.
Hollow cylinders and tubes
The volume of a tube, pipe wall or annulus is the outer cylinder minus the inner bore:
V = (π ÷ 4)(D² − d²) h
with D the outside diameter, d the inside diameter and h the length. That hollow cylinder volume is the material in a tube or the gap in a jacketed vessel. It is the volume-of-a-hollow-pipe formula — the wall, not the bore. If you want the water a pipe carries, that is the bore, and the dedicated pipe volume calculator is the right tool.
Cones and spheres
For a complete set of round shapes, a cone is one-third of its bounding cylinder, V = (1 ÷ 3) π r² h, handy for conical tank bottoms and hoppers, and a sphere is V = (4 ÷ 3) π r³. Between the vertical and horizontal cylinder, the hollow tube, the oval tank, the cone and the sphere, this covers the volume of cylinders, cones and spheres in one calculator.
A worked example
A horizontal tank, 48″ diameter and 120″ shell, with 2:1 elliptical ends, filled to 24″ (the centreline):
Shell, half full = ½ × (π ÷ 4) × 48² × 120 ≈ 108,573 in³.
Both elliptical ends, half full = (π × 24² ÷ 3)(3×24 − 24) × 0.5 ≈ 14,476 in³.
Liquid ≈ 123,050 in³ ≈ 533 US gallons (about 2016 litres), exactly half the full capacity at the centreline.
Find or measure the volume of a cylinder
To find the volume of a cylinder you only need two measurements: the diameter (or radius) and the height or length. Measure the inside diameter if you want the capacity it holds; measure carefully, since the diameter is squared and a small error doubles in the answer. For a horizontal tank, also measure the liquid depth from the inside bottom. For US and UK readers alike, “litre” and “liter”, “metre” and “meter”, and “cubic centimetre” and “cc” are the same thing; the arithmetic is identical and only the spelling of the unit changes.
[ Ad slot — replace with AdSense / Ezoic code ]
Frequently asked questions
What is the cylinder volume formula?
The volume of a cylinder is the area of its circular cross-section times its height, V = π × r² × h, where r is the radius and h is the height or length. If you have the diameter d rather than the radius, V = (π ÷ 4) × d² × h, since r = d ÷ 2. Keep the radius and height in the same length unit and the answer comes out in that unit cubed — centimetres give cubic centimetres, inches give cubic inches — which the calculator then converts into gallons, litres and the rest. That single formula covers a vertical tank, a drum stood on end, a pipe length or any straight-sided round container.
Why isn't a horizontal tank at 50% depth half full?
Because a horizontal cylinder has a circular cross-section, and the area of liquid in a circle does not grow evenly with depth. At the very bottom each extra inch of depth adds only a thin sliver of area, the area grows fastest as the liquid passes the middle, then tapers off again near the top. The one neat exception is the half-way line: a tank filled exactly to its centreline holds exactly half its volume, because the circle is symmetric top to bottom. Everywhere else the fill percent and the depth percent differ — a quarter-deep horizontal tank holds far less than a quarter — which is why this tool uses the circular-segment area rather than a straight fraction of the full volume.
How do end caps change a tank's volume?
Flat ends add nothing beyond the straight cylindrical shell. Curved heads stick out past the shell and add real capacity that simple calculators ignore, often 10 to 20 percent. Two 2:1 semi-elliptical heads together add about one-sixth of the shell volume; two hemispherical heads together add about one-third, since the pair forms a full sphere. This calculator lets you pick flat, hemispherical or 2:1 elliptical ends, adds their contribution to the straight shell for the total, and for a partly filled horizontal tank it adds the matching filled portion of the heads at your liquid depth, so the capacity and the gauge reading both account for the ends.
How do I calculate the volume of a hollow cylinder, tube or pipe wall?
A hollow cylinder is the outer cylinder minus the inner bore, so its volume is V = (π ÷ 4) × (D² − d²) × h, where D is the outside diameter, d is the inside diameter and h is the length. That annulus formula gives the volume of the material in a tube or pipe wall, or the space in a jacketed vessel. The hollow-cylinder mode here takes the outside and inside diameters and the length and returns that ring of volume. If instead you want the water a plumbing pipe carries — the bore, not the wall — use the dedicated pipe volume calculator.
How do I get tank capacity in gallons or litres from the dimensions?
Work out the volume in one consistent unit, then convert with exact factors: 1 US gallon = 231 cubic inches, 1 UK gallon = 277.4194 cubic inches, 1 cubic foot = 1728 cubic inches, 1 litre = 1000 cubic centimetres, 1 cubic inch = 16.387064 cubic centimetres, and 1 cubic yard = 27 cubic feet. US and UK gallons are not the same — the imperial gallon is about 20 percent larger — so this calculator always shows both, alongside litres, cubic metres, cubic feet, cubic inches, cubic centimetres and cubic yards. Enter the diameter and height of a circular tank and you have the capacity in every common unit at once.
Can it also do cones and spheres?
Yes. A cone is one-third of the cylinder that would contain it, V = (1 ÷ 3) × π × r² × h, useful for conical tank bottoms and hoppers. A sphere is V = (4 ÷ 3) × π × r³, useful for spherical tanks and as a check on hemispherical heads, since two hemispheres make one sphere. Both are selectable shapes here, so the tool covers the volume of cylinders, cones and spheres in one place and reports each in the full set of capacity units.