What to Measure Before You Type Anything
The calculator takes two numbers, a radius and a height, in one unit (meters, centimeters, feet, or inches). Most mistakes happen before those numbers reach the form, so it pays to get them right first.
- Radius, not diameter. A tape measure across the top of a can or tank gives you the diameter. Halve it. The results panel shows the diameter back to you, so you can confirm you entered the right figure.
- Inside, not outside. For how much a container holds, measure the inside radius and inside depth. Outside dimensions include the wall and the base, and overstate capacity.
- One unit for both. If the diameter is in inches and the height in feet, convert one of them before entering. The calculator applies the unit you pick to both fields.
Once the inputs are in, you get the volume in cubic units, the base area, and the same volume in liters, US gallons, imperial gallons, and cubic feet, plus the steps.
The Formula: V = πr²h
Think of a cylinder as a stack of identical circles. Each circle has area πr², and the stack is h tall, so the volume is the base area times the height. That is the whole formula, and it is also why doubling the radius makes a cylinder hold four times as much, while doubling the height only doubles it.
If you only have the diameter, the same formula reads V = π(d/2)²h. A cylinder 8 cm across and 12 cm tall has r = 4 cm, so V = π × 16 × 12 = 192π, about 603.2 cm³.
A cone with the same base and height holds exactly one-third of this. Why a cone is exactly one-third of a cylinder shows where that fraction comes from.
Five Cylinders, Worked Through
These cover the usual cases: a school problem, a tank, a column measured in mixed units, a reverse problem, and a pipe.
| Object | Given | Working | Result |
|---|---|---|---|
| Soup can (π = 3.14) | r = 4 cm, h = 11 cm | 3.14 × 16 × 11 | 552.64 cm³, about 552.6 mL |
| Water tank | r = 1.5 ft, h = 6 ft | π × 2.25 × 6 = 42.41 ft³; × 7.48052 | about 317.3 US gal |
| Concrete column | d = 18 in, h = 8 ft | r = 0.75 ft; π × 0.5625 × 8 | about 14.14 ft³ |
| Missing height (π = 3.14) | V = 395.64 in³, r = 3 in | 395.64 ÷ (3.14 × 9) = 395.64 ÷ 28.26 | h = 14 in |
| Straight pipe | inside d = 10 cm, length 2 m | r = 0.05 m; π × 0.0025 × 2 | 0.0157 m³, about 15.7 L |
The column is the one that trips people up. The diameter is in inches and the height in feet, so the 18 inches becomes 1.5 feet before halving. Enter r = 9 with the unit set to feet and the answer comes out 144 times too big. To check any row, enter its radius and height above with the matching unit.
The pipe is a reminder that "height" just means length along the axis. A cylinder lying on its side, like a pipe or a horizontal drum, still uses V = πr²h with h as its length. What changes for a horizontal tank is working out a partial fill, which needs a different formula.
Working Backwards From a Target Volume
Sometimes the capacity is fixed and a dimension is the unknown: a 200-liter drum that must fit under a shelf, or a planter that has to hold a set amount of soil. Rearrange the formula:
Say a container must hold 200 liters (0.2 m³) and can be at most 0.8 m tall. Then r = √(0.2 ÷ (π × 0.8)) = √0.0796 ≈ 0.282 m, so the inside diameter needs to be at least about 56.4 cm. Because radius sits under a square root, a small increase in width buys a lot of volume, which is why wide, short tanks are common where headroom is limited.
Hollow Cylinders: Material vs Space
A pipe or tube raises two different questions. How much water fits inside? Use the inner radius in πr²h. How much material is the tube made of? Subtract the inner cylinder from the outer one:
A 2 m pipe with outer radius 0.08 m and inner radius 0.06 m has material volume π × 2 × (0.0064 − 0.0036) = π × 2 × 0.0028 ≈ 0.0176 m³. Multiply by the material's density to get the weight of the pipe. Run the calculator twice, once with each radius, and subtract the two volumes to get the same answer.
From Cubic Units to Liters and Gallons
The shortcuts worth remembering: 1,000 cm³ is 1 liter, 1 m³ is 1,000 liters, 231 in³ is 1 US gallon, and 1 ft³ is about 7.48 US gallons. A US gallon (3.785 L) is smaller than an imperial gallon (4.546 L), so the same tank shows a bigger number in US gallons. The calculator lists both so you can use whichever your country or supplier quotes.
When You Need More Than the Volume
Cylinder volume tells you total capacity. It doesn't tell you how many balls, fruit, or spherical parts fit inside, because round objects leave gaps. For that, use the Sphere Packing Calculator, or follow the layer-by-layer method in sphere packing in a cylinder. The box version of the same problem is in how to find the optimal box dimensions to pack 27 spheres.
For a rectangular tank, the Tank Volume Calculator gives the same liters and gallons output. And if you are sizing a round water tank specifically, How Much Water Does a Cylindrical Tank Hold? walks through the conversion and includes a dipstick table for reading the level.
How the Numbers Are Checked
The code computes volume in cubic meters once, then derives every readout from that single number: liters (volumeM3 × 1000), US gallons (liters × 0.2641720524), imperial gallons (liters × 0.2199692483), and cubic feet (volumeM3 × 35.3146667). Each factor is a published constant, not a rounded shortcut, so multiplying the liters figure by the gallon factor by hand reproduces what's on screen.
Frequently Asked Questions
How do you calculate the volume of a cylinder?
Use V = πr²h. Square the radius, multiply by pi (3.14159), then multiply by the height. For a cylinder with radius 4 cm and height 11 cm: V = 3.14159 × 16 × 11 ≈ 552.6 cm³.
How do I calculate cylinder volume in gallons?
Find the cubic volume first, then convert. Cubic feet × 7.48052 = US gallons. Cubic inches ÷ 231 = US gallons. The calculator converts automatically for all common units.
My answer seems way too large, what went wrong?
The most common cause is using diameter instead of radius. The formula squares the radius, so using the diameter makes the result four times too large. Also check that all units match, meters vs centimeters can produce a factor of 1,000,000 difference in cubic volume.
References
- Cylinder, Wikipedia: geometric definition, volume and surface area formulas, and oblique cylinder notes.
- Cylinder, Wolfram MathWorld: formal derivation of the cylinder volume formula and related properties.
- Cylinder, Math is Fun: visual explanation of the cylinder formula with worked examples.