How does the cylinder volume Excel formula calculator work?
The cylinder volume Excel formula calculator builds the spreadsheet formula =PI()*A2^2*B2 (or =PI()*(A2/2)^2*B2 for a diameter) and checks the answer for your numbers.
The cylinder volume Excel formula calculator works in 5 steps:
- 1Choose the length unit you use in the spreadsheet.
- 2Choose diameter or radius, to match what is in column A.
- 3Enter a sample diameter or radius and height.
- 4Copy the Excel formula shown under the result into cell C2.
- 5Fill the formula down; every row gives its own cylinder volume.
Cylinder volume Excel formula formula
The Excel formula for the volume of a cylinder is =PI()*A2^2*B2, with the radius in A2 and the height in B2. With the diameter in A2, use =PI()*(A2/2)^2*B2.
- PI()Excel's π, 3.14159265358979
- A2radius (or diameter ÷ 2)
- ^2squares the radius
- B2height or length
How the cylinder volume Excel formula formula is derived
The cylinder volume Excel formula formula comes from 4 steps:
- Write V = πr²h with spreadsheet operators: * for ×, ^ for powers.
- Use PI() for π; it needs the empty brackets.
- Point at the cells: =PI()*A2^2*B2.
- Wrap a diameter in brackets before squaring: (A2/2)^2.
Cylinder volume Excel formula formula facts
- Google Sheets, LibreOffice Calc and Apple Numbers use the same =PI()*A2^2*B2 formula.
- In Python the same line is math.pi * r**2 * h; a 30 cm × 50 cm cylinder gives 35,342.92 cm³.
Worked example: spreadsheet tank list
Answer: 35,342.92 cm³ (≈ 35.34 liters)
- Cell A2 = diameter 30, cell B2 = height 50
- C2: =PI()*(A2/2)^2*B2
- r = d ÷ 2 = 30 ÷ 2 = 15 cm
- = π × 15² × 50
- = 35,342.92 cm³
The calculator above opens with these values. Change any input to rework the example.
Cylinder volume Excel formula conversion chart
With A2 = 30 (diameter, cm) and B2 = 50 (height, cm), =PI()*(A2/2)^2*B2 returns 35,342.92 cm³ (35.34 L). The chart lists 6 rows as they would appear in a sheet.
| A: diameter × B: height | C: =PI()*(A/2)^2*B | Litres | US gal |
|---|---|---|---|
| 10 × 20 cm | 1,570.8 cm³ | 1.57 | 0.41 |
| 20 × 30 cm | 9,424.78 cm³ | 9.42 | 2.49 |
| 30 × 50 cm | 35,342.92 cm³ | 35.34 | 9.34 |
| 50 × 80 cm | 157,079.63 cm³ | 157.08 | 41.5 |
| 80 × 120 cm | 603,185.79 cm³ | 603.19 | 159.34 |
| 100 × 150 cm | 1,178,097 cm³ | 1,178.1 | 311.22 |
Every value in the cylinder volume Excel formula conversion chart comes from the same calculation as the calculator above.
Excel, Google Sheets and Python formulas
Put the diameter in column A and the height in column B, then type the formula in C2 and fill it down:
| Task | Formula |
|---|---|
| Volume from radius (A) and height (B) | =PI()*A2^2*B2 |
| Volume from diameter (A) and height (B) | =PI()*(A2/2)^2*B2 |
| Cubic inches to US gallons | =C2/231 |
| cm³ to litres | =C2/1000 |
| Height for a target volume V (D2) | =D2/(PI()*A2^2) |
| Partly filled horizontal cylinder, radius A2, length B2, depth E2 | =B2*(A2^2*ACOS((A2-E2)/A2)-(A2-E2)*SQRT(2*A2*E2-E2^2)) |
In Python, import math then volume = math.pi * r**2 * h. The partly filled horizontal formula is the circular segment area times the length; the tank calculator draws it.
Cylinder volume Excel formula FAQs
What is the Excel formula for the volume of a cylinder?
=PI()*A2^2*B2, with the radius in A2 and the height in B2.
How do I use a diameter in the Excel formula?
Halve it inside the formula: =PI()*(A2/2)^2*B2.
How do I insert the cylinder volume formula in Excel?
Click cell C2, type =PI()*A2^2*B2 and press Enter, then drag the fill handle down the column.
What is the Excel formula for a partly filled horizontal cylinder?
With radius A2, length B2 and liquid depth E2: =B2*(A2^2*ACOS((A2-E2)/A2)-(A2-E2)*SQRT(2*A2*E2-E2^2)).
How do I convert the result to gallons or litres in Excel?
Divide cubic inches by 231 for US gallons, or cm³ by 1,000 for litres: =C2/231 or =C2/1000.
How do you calculate cylinder volume in Python?
Use import math and volume = math.pi * r**2 * h.
Why does Excel show #NAME? for my formula?
You probably typed PI without the brackets. Excel needs PI().