Excel Formula for Cylinder Volume: A Clear Example

Formulas & functions · Updated November 18, 2026

For a cylinder with its radius in cell A2 and its height in B2, enter =PI()*A2^2*B2 in another cell. The result is the cylinder’s volume in cubic units, provided the radius and height use the same unit.

The Cylinder Volume Formula

A cylinder has a circular base and a constant cross-section along its height. Its volume is the area of that circular base multiplied by the cylinder’s height. The area of a circle is pi times the radius squared, so the volume formula is V = πr²h. In Excel, PI() supplies an approximation of pi, and the caret symbol ^ raises a value to a power.

The order in the Excel formula reflects the geometry: square the radius, multiply by pi to get the base area, then multiply by the height. Excel follows the usual order of operations, so the exponent is evaluated before multiplication. Parentheses are not required around the squared radius, though they can make the expression easier to scan.

The formula returns a number, not a unit label. If the measurements are in centimetres, the result represents cubic centimetres; if they are in inches, it represents cubic inches. Excel cannot infer the measurement unit from the values, so it is important to label the input columns and the result clearly.

Set Up the Worksheet

A simple layout makes the calculation easier to audit and reuse. Put a description and unit beside each measurement, and keep the radius and height in separate numeric cells. For example, use A1 for Radius (cm), B1 for Height (cm), and C1 for Volume (cm³); enter the measured radius in A2 and height in B2.

With radius in A2 and height in B2, enter =PI()*A2^2*B2 in C2. After you press Enter, Excel calculates the volume. To calculate more cylinders, fill the formula down column C. Excel adjusts the relative references for each row: the next row will use A3 and B3, then A4 and B4, and so on.

In Microsoft Excel for Microsoft 365 on Windows, you can fill a formula down by dragging the small square at the bottom-right corner of the selected cell, called the fill handle. You can also select the formula cell and the cells below it, then press Ctrl+D. On a Mac, the fill handle works similarly; the keyboard shortcut for filling down is Control+D. Excel for the web also supports filling with the fill handle.

  • Use one column for radius and another for height.
  • Keep the units consistent within each calculation.
  • Use a clear result heading, such as Volume (cm³), so the output is not mistaken for an area.

Worked Example and Result

Suppose a cylinder has a radius of 3 centimetres and a height of 10 centimetres. The circular base area is π × 3², or about 28.274 square centimetres. Multiplying that area by 10 centimetres gives about 282.743 cubic centimetres. The squared radius is why doubling the radius has a larger effect than doubling the height.

With the radius value 3 in A2 and the height value 10 in B2, enter =PI()*A2^2*B2 in C2. Excel returns approximately 282.7433388. The exact displayed number depends on the cell’s number format, but the stored result retains Excel’s calculated precision. If the worksheet labels the measurements in centimetres, label the output in cubic centimetres, not square centimetres.

This example is also a useful check when reviewing a spreadsheet. The radius squared is 9, and 9 × 10 × π is approximately 282.743. If the sheet returns 94.248 or 30, check whether the height or radius was omitted, the radius was entered incorrectly, or the calculation was set up for a different shape.

Using Diameter Instead of Radius

Measurements are sometimes supplied as a diameter rather than a radius. The diameter runs all the way across the circular base through its centre; the radius is half of that distance. Do not put a diameter directly into the radius position, because doing so would make the calculated volume four times too large: the radius is squared in the formula.

You can either divide the diameter by 2 in a separate cell or include that division in the formula. With diameter in A2 and height in B2, enter =PI()*(A2/2)^2*B2 in C2. For a diameter of 6 centimetres and height of 10 centimetres, the result is again approximately 282.743 cubic centimetres. This matches the earlier example because a 6-centimetre diameter corresponds to a 3-centimetre radius.

The parentheses around A2/2 matter: they make Excel halve the diameter before squaring it. Writing a formula that squares the diameter without halving it first will overstate the volume. If the worksheet will be used by someone else, label the input specifically as Diameter rather than using a generic heading such as Size.

Units and Converting the Result

For the standard formula, the radius and height must use the same length unit. For example, a radius in centimetres and a height in metres should not be multiplied together without conversion. Convert one measurement first, or convert both to a common unit, then interpret the result in the corresponding cubic unit.

Volume units are cubed. A cylinder measured in centimetres produces cubic centimetres, written cm³; a cylinder measured in metres produces cubic metres, written m³. This is different from surface area, which is measured in square units. A common misconception is to report the cylinder formula’s result in square centimetres because the base-area step uses square centimetres. Multiplying that area by a length changes the final unit to cubic centimetres.

For a volume in litres from measurements entered in centimetres, divide the cubic-centimetre result by 1,000, since 1 litre equals 1,000 cubic centimetres. With radius in A2 and height in B2, both measured in centimetres, enter =PI()*A2^2*B2/1000 to return litres. For the 3 cm by 10 cm example, the result is approximately 0.282743 litres. Keep the source units visible so a later reader knows why the conversion factor is present.

Be careful when converting cubic metres to litres: the conversion factor is 1,000 litres per cubic metre, not 100. For other unit systems, convert lengths consistently before applying the formula, or use a clearly documented conversion factor after calculating the volume. Avoid mixing a converted input with an unconverted one.

Rounding and Displaying the Answer

Excel often displays fewer decimal places than it stores. That is usually a display setting, not a change to the underlying calculation. Select the result cells and use Home > Number to choose a number format or adjust the displayed decimal places. A volume may be easier to read when displayed to two or three decimal places, while a technical calculation may need more precision.

If the calculation itself should be rounded to two decimal places, rather than merely displayed that way, use the ROUND function. With radius in A2 and height in B2, enter =ROUND(PI()*A2^2*B2,2) in C2. For radius 3 and height 10, Excel returns 282.74. The second argument, 2, specifies the number of decimal places.

Rounding the formula can affect later calculations that use the result. If this volume feeds into another calculation, it is often better to keep the full calculated value and apply a number format only for presentation. Use ROUND when the rounded value itself is required, such as when a specification calls for a result to two decimal places.

Common Errors and How to Check Them

Most incorrect cylinder-volume results come from input or unit mistakes rather than a problem with PI(). Check that the measurement is a radius rather than a diameter, that the height is the cylinder’s full perpendicular height, and that the two inputs use the same unit. Also check that the formula references the intended row; a formula copied from another area may point to the wrong cells.

  • Diameter entered as radius: halve the diameter, either in the input or inside the formula.
  • Mixed units: convert both lengths to the same unit before calculating.
  • Wrong exponent: use ^2 for the radius; do not multiply radius by 2 in place of squaring it.
  • Area confused with volume: the base area alone is in square units; multiplying by height produces cubic units.
  • Text in an input cell: make sure the referenced cells contain numeric measurements, not entries such as 3 cm typed as text.

A quick reasonableness check is to compare the result with the base area multiplied by height. For positive measurements, a taller cylinder with the same radius must have proportionally greater volume. If height doubles and radius stays fixed, volume doubles. If radius doubles and height stays fixed, volume becomes four times as large because the radius is squared. These relationships can reveal a misplaced reference or a diameter-versus-radius error.

When the Cylinder Formula Applies

The formula assumes a right circular cylinder: the ends are circular, the sides are straight, and the two bases are parallel and the same size. The height is the perpendicular distance between the bases. A pipe, can, or straight-sided tank is often approximated as a cylinder, but the formula may not represent a container whose walls taper, bulge, or have irregular ends.

For a hollow cylinder, the simple formula gives the volume inside the outer boundary as though the cylinder were solid. To find the material volume of a pipe wall, subtract the inner cylinder’s volume from the outer cylinder’s volume. Measure the inner and outer radii and use the same height and unit system for both. If the object has rounded ends, fittings, or changing dimensions, its volume may need to be calculated as several shapes or measured using a more suitable method.

For a real tank, the formula returns its full geometric capacity only if the measured dimensions describe the inside of the tank and the shape is genuinely cylindrical. External dimensions include wall thickness and can overstate usable capacity. The actual fill volume also depends on the liquid level; the full-cylinder calculation does not tell you how much liquid is in a partly filled tank.

Frequently Asked Questions

What is the Excel formula for the volume of a cylinder?
Use PI() times the radius squared times the height. With radius in A2 and height in B2, enter =PI()*A2^2*B2.

Can I calculate cylinder volume from diameter and height?
Yes. Halve the diameter before squaring it. With diameter in A2 and height in B2, use =PI()*(A2/2)^2*B2.

Does Excel have a cylinder-volume function?
No dedicated cylinder-volume function is needed. Excel’s PI() function and ordinary multiplication and exponent operators calculate the result directly.

Why is my cylinder volume four times too large?
A likely cause is entering the diameter where the formula expects a radius. Since the radius is squared, using a diameter that is twice the radius makes that part of the calculation four times as large.

How do I show the result in litres?
If radius and height are in centimetres, divide the result in cubic centimetres by 1,000. Check that the input measurements are both in centimetres before using that conversion.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.