The volume of a cylinder is V = πr²h: multiply π by the radius squared, then by the height. This volume of a cylinder calculator also works backwards, finding the height or the radius when you already know the volume. It accepts radius or diameter, handles hollow cylinders and pipes, estimates the liquid in a partly filled horizontal or vertical tank, and gives the lateral and total surface area. Answers are shown in cubic units and in ft³, in³, m³, liters and US gallons.
A can 3 inches across and 4.5 inches tall, for example, has r = 1.5 in, so V = π × 1.5² × 4.5 ≈ 31.81 in³, or 0.138 US gallons.
How to use the calculator
- Choose what you want to find: volume, height, radius, a hollow cylinder, or a partly filled tank.
- Pick a length unit and say whether you are entering the radius or the diameter. A tape measure across the top gives the diameter.
- Enter the dimensions. To solve for height or radius, type the volume and choose its unit (ft³, in³, yd³, m³, liters, US or UK gallons).
- For a tank, choose horizontal or vertical and enter the liquid depth measured from the bottom, the way a dipstick reads it.
- Read the answer, the unit conversions and the surface areas. In tank mode the chart shows how volume grows with depth.
Volume of a cylinder formula
A right circular cylinder is a stack of identical circles, so its volume is the base area times the height. OpenStax Prealgebra 2e writes this as V = πr²h, where r is the radius of the base and h is the perpendicular height. If you measured the diameter D, use r = D ÷ 2, or the equivalent form V = πD²h ÷ 4.
Keep the units consistent. If the radius is in inches and the height in feet, convert one before multiplying, or the answer is meaningless. The result is in the cube of that unit. The calculator converts internally with the exact definitions in NIST Handbook 44: 1 inch = 2.54 cm, 1 US gallon = 231 in³ and 1 liter = 1 dm³.
| Quantity | Formula |
|---|---|
| Volume | V = πr²h |
| Volume from diameter | V = πD²h ÷ 4 |
| Height from volume | h = V ÷ (πr²) |
| Radius from volume | r = √(V ÷ (πh)) |
| Lateral (side) area | A = 2πrh |
| Total surface area | S = 2πr² + 2πrh |
| Hollow cylinder (wall) | V = π(R² − r²)h |
| Horizontal tank, depth d | V = L·[r²·arccos((r − d)/r) − (r − d)·√(2rd − d²)] |
How to find the height of a cylinder
If you know the volume and the radius, divide the volume by the area of the base: h = V ÷ (πr²). Suppose a cylinder holds 500 in³ and has a 4 in radius. The base is π × 16 ≈ 50.27 in², so h = 500 ÷ 50.27 ≈ 9.947 in.
When the volume is in gallons or liters, convert it to the cube of your length unit first. A 5-gallon container is 5 × 231 = 1,155 in³. With a 5.5 in radius, the height is 1,155 ÷ (π × 30.25) ≈ 12.15 in. In height mode the calculator does this conversion for you.
If you know the surface area instead of the volume, h = (S − 2πr²) ÷ (2πr). Subtract the two ends, then divide what is left, the side, by the circumference.
How to find the radius of a cylinder
With the volume and height known, r = √(V ÷ (πh)). For 1,000 cm³ in a cylinder 10 cm tall: 1,000 ÷ (π × 10) ≈ 31.831, and the square root is 5.642 cm, a diameter of about 11.28 cm. That is the size of a one-liter can 10 cm tall.
From the circumference C, which you can measure with a string or flexible tape, r = C ÷ (2π). This is often more accurate on a large tank or tree trunk, where you can't reach across the middle. From the lateral area and height, r = A ÷ (2πh).
Find the total surface area of the following cylinder
Textbook exercises often show a drawn cylinder with its radius and height and ask for the total surface area. Work it in three parts, as in OpenStax Contemporary Mathematics Example 10.60, which uses a cylinder with a 5 in radius and a 12 in height:
- One end: π × 5² ≈ 78.54 in². Two ends: 157.08 in².
- The side: circumference × height = 2π × 5 × 12 ≈ 376.99 in².
- Total: 157.08 + 376.99 ≈ 534.07 in². The volume of the same cylinder is π × 25 × 12 ≈ 942.48 in³.
If the drawing gives the diameter, halve it first. Open-topped shapes such as a cup or a pipe without ends need a different count of end circles: a cup has one base, so its outer area is πr² + 2πrh.
Hollow cylinders, pipes and tubes
A pipe is a cylinder with a smaller cylinder removed. The volume of the wall material is π(R² − r²)h, where R is the outside radius and r the inside radius. For 10 ft (120 in) of pipe with a 4.5 in outside diameter and a 4 in bore, the wall is π × (2.25² − 2²) × 120 ≈ 400.6 in³. The bore holds π × 2² × 120 ≈ 1,508 in³, or 6.53 US gallons of water.
Use the outside diameter for material, paint or insulation, and the inside diameter for flow or how much liquid the pipe holds. Nominal pipe sizes are not the true inside diameter, so measure or check the manufacturer's dimension table.
| Inside diameter | in³ per ft | US gal per ft | Liters per meter |
|---|---|---|---|
| 0.5 in | 2.36 | 0.0102 | 0.127 |
| 0.75 in | 5.3 | 0.0229 | 0.285 |
| 1 in | 9.42 | 0.0408 | 0.507 |
| 1.5 in | 21.21 | 0.0918 | 1.14 |
| 2 in | 37.7 | 0.1632 | 2.027 |
| 3 in | 84.82 | 0.3672 | 4.56 |
| 4 in | 150.8 | 0.6528 | 8.107 |
| 6 in | 339.29 | 1.4688 | 18.241 |
| 8 in | 603.19 | 2.6112 | 32.429 |
| 10 in | 942.48 | 4.08 | 50.671 |
| 12 in | 1,357.17 | 5.8752 | 72.966 |
| 24 in | 5,428.67 | 23.5007 | 291.864 |
| 36 in | 12,214.51 | 52.8767 | 656.693 |
| 48 in | 21,714.69 | 94.003 | 1,167.454 |
Partially filled tanks
For a vertical tank, liquid volume is simple: πr² × the liquid depth. The cross-section is the same at every height, so the volume is proportional to the depth.
A horizontal tank is harder because it is narrow at the bottom, widest in the middle and narrow again at the top. The liquid's end face is a circular segment. Wolfram MathWorld gives its area as r²·arccos((r − d)/r) − (r − d)·√(2rd − d²), where d is the depth of liquid. Multiply by the tank length for the volume. The U.S. National Bureau of Standards (now NIST) used the same method in its Circular C416 gallonage tables: segment area times length, divided by 231 in³ per gallon. The formula reproduces its figures. At a depth of one quarter of the diameter, its Table 1 gives a coefficient of 0.153546 × D², and its worked example, a 48 in tank 120 in long filled to 18 in, holds 2.683 gal per inch of length, or 322 gallons. For a 48 in diameter tank 72 in long with 12 in of liquid, the segment is 353.8 in², so it holds 25,471 in³, about 110.3 US gallons out of a 564-gallon capacity.
| Depth (% of diameter) | Volume (% of capacity) |
|---|---|
| 5% | 1.9% |
| 10% | 5.2% |
| 20% | 14.2% |
| 25% | 19.6% |
| 30% | 25.2% |
| 40% | 37.4% |
| 50% | 50% |
| 60% | 62.6% |
| 70% | 74.8% |
| 75% | 80.4% |
| 80% | 85.8% |
| 90% | 94.8% |
| 95% | 98.1% |
The table works for any size of horizontal cylinder with flat ends, because it depends only on the ratio of depth to diameter. Dished or hemispherical tank heads add volume that a flat-ended model leaves out.
Worked examples
Water in a vertical tank: 48 in diameter, 60 in tall
r = 24 in. V = π × 24² × 60 ≈ 108,573 in³. Divided by 231, that is 470 US gallons, or 1,779 liters.
Concrete for a round column: 12 in diameter, 8 ft tall
Work in feet: r = 0.5 ft, V = π × 0.25 × 8 ≈ 6.283 ft³, or 0.233 cubic yards. The cubic yards calculator turns that into bags or a delivery order, and the Sonotube concrete calculator does the same for round column forms.
Soil for a round planter: 60 cm across, 40 cm deep
r = 30 cm. V = π × 900 × 40 ≈ 113,097 cm³, which is 113.1 liters.
Cylinder from a volume: a 2-liter bottle 30 cm tall
2 L = 2,000 cm³. r = √(2,000 ÷ (π × 30)) ≈ 4.61 cm, so a straight-sided bottle of that height would be about 9.2 cm across.
Common mistakes
- Using the diameter as the radius. Squaring the diameter makes the volume four times too big. Halve it first, or pick "Diameter" in the calculator.
- Mixing units. A radius in inches with a height in feet gives nonsense. Convert everything to one unit.
- Dividing gallons by the wrong constant. The US liquid gallon is 231 in³. The UK (imperial) gallon is larger, about 4.546 liters.
- Using lateral area when the question wants total area. Lateral area is the side only; total adds both ends.
- Treating a horizontal tank as linear. Half the depth is half full, but a quarter of the depth holds much less than a quarter of the volume.
- Rounding π too early. Textbooks that use 3.14 get slightly different answers from a calculator that uses full precision. Round only at the end.
For boxes, spheres and cones, use the cubic feet calculator. To weigh the liquid in a tank, try the weight per gallon calculator, and to convert a metric pipe diameter, the mm to inches converter.
Frequently asked questions
What is the formula for the volume of a cylinder?
V = πr²h: the area of the circular base (π times the radius squared) multiplied by the height. OpenStax Prealgebra 2e gives this formula for any right circular cylinder. Use the same length unit for r and h and the answer comes out in that unit cubed.
How do you find the height of a cylinder from its volume?
Rearrange V = πr²h to h = V ÷ (πr²). Square the radius, multiply by π, and divide the volume by that base area. The volume must be in the cube of the radius unit, so convert gallons or liters to cubic inches or cubic centimeters first.
How do you find the radius of a cylinder from its volume and height?
Rearrange to r = √(V ÷ (πh)). Divide the volume by π times the height, then take the square root. Double the result for the diameter.
How do you find the volume of a cylinder with the diameter?
Halve the diameter to get the radius, then use V = πr²h. Equivalently V = πD²h ÷ 4. Forgetting to halve the diameter makes the answer four times too large.
How do you find the total surface area of a cylinder?
Total surface area = 2πr² + 2πrh: two circular ends plus the side. The side, or lateral area, is the circumference 2πr times the height, the area of the label you could peel off a can. For r = 5 in and h = 12 in, OpenStax gets 157 in² of ends plus 377 in² of side, about 534 in² in total.
How many gallons are in a cylinder?
Find the volume in cubic inches and divide by 231, because NIST Handbook 44 defines the US gallon as exactly 231 cubic inches. In cubic feet, multiply by 7.4805. For liters, divide cubic centimeters by 1,000.
How do you calculate the volume of a hollow cylinder or pipe?
Subtract the inner cylinder from the outer: V = π(R² − r²)h, where R is the outside radius and r the inside radius. That gives the volume of material in the wall. The volume the pipe can hold is πr²h using the inside radius only.
How do you work out the volume of liquid in a horizontal cylindrical tank?
The liquid's cross-section is a circular segment. Its area is r²·arccos((r − d)/r) − (r − d)·√(2rd − d²), where d is the depth of liquid. Multiply that area by the tank length. The calculator's partially filled tank mode does this and draws the fill curve.
Is a cylinder half full when the liquid is at half the height?
Yes for both a vertical and a horizontal cylinder: at exactly half the height (or half the diameter when lying down) the tank holds half its volume. Away from the middle they differ. A horizontal tank at 25% of its diameter holds only about 19.6% of its capacity, because the round bottom holds less.
What units does the volume of a cylinder come out in?
Cubic units of whatever length you used: in³ for inches, cm³ for centimeters, ft³ for feet. The calculator also converts the answer to ft³, in³, m³, liters and US gallons.
Sources & method
- OpenStax Prealgebra 2e, §9.6 Volume and Surface Area — V = πr²h and S = 2πr² + 2πrh
- OpenStax Contemporary Mathematics, §10.7 Volume and Surface Area — right-cylinder formulas and Example 10.60
- NIST Handbook 44 (2026), Appendix C — US gallon = 231 in³ exactly; inch = 2.54 cm exactly; liter = 1 dm³
- National Bureau of Standards (now NIST) Circular C416, Gallonage Tables for Horizontal Cylindrical Tanks with Flat Ends (1937) — segment-area coefficients and per-inch capacity tables
- Wolfram MathWorld, Circular Segment — segment area from radius and height (eq. 18)
Results are estimates for general information. Found an error? It helps everyone — see our methodology.