Volume of a Cylinder Formula: V = πr²h Explained
The volume of a cylinder is V = πr²h: pi times the radius squared times the height. Square the radius, multiply by π (about 3.14159), then multiply by the height. The answer is in cubic units, such as cubic inches, cubic feet or cubic centimeters. This guide shows what each letter means, walks through worked examples with a radius and with a diameter, and covers the conversions and special cases (half cylinders, lying-down tanks) that trip people up.
TL;DR
- The formula is V = πr²h, where r is the radius of the circular end and h is the height (or length).
- If you have the diameter, halve it first: r = d ÷ 2. Equivalent form: V = πd²h ÷ 4.
- Every length must use the same unit before you multiply. Convert the finished volume to gallons or liters afterward.
- A half cylinder is half the result: V = ½πr²h.
- A partly filled tank lying on its side needs a different, circular-segment formula. A partly filled upright tank does not.
Table of Contents
- The formula and what each letter means
- Why the formula works
- How to calculate cylinder volume step by step
- Worked example 1: radius and height given
- Worked example 2: a larger right cylinder
- When you are given the diameter
- Converting to gallons, liters and other units
- Common cylinder volume mistakes
- Half a cylinder
- Cylindrical tanks: full, upright and lying down
- Where this formula gets used
- Perspective: why we favor the formula, then the check
- Skip the arithmetic with our free tools
- Frequently asked questions
- Sources
The formula and what each letter means
A cylinder is a three-dimensional shape with the same circular cross-section along its whole length, as BBC Bitesize describes it. The formula there is:
V = πr²h| Symbol | Meaning | Typical unit |
|---|---|---|
| V | Volume of the cylinder | in³, ft³, cm³, m³ |
| π | Pi, about 3.14159 | no unit |
| r | Radius of the circular end (center to edge) | in, ft, cm, m |
| h | Height, or length if the cylinder lies on its side | in, ft, cm, m |
The height and the length are the same measurement. As BBC Bitesize notes, depending on how the cylinder is oriented, its length can be called its height. A pipe lying on the floor has a length; a can standing on a shelf has a height. Use the distance between the two circular ends either way.
Why the formula works
You do not have to memorize it blindly, because the logic is short. The Open University's geometry course gives the general rule: volume equals the constant cross-sectional area multiplied by the length measured at right angles to that cross-section.
For a cylinder, the cross-section is a circle, and the area of a circle is πr². Multiply that area by the height and you get πr²h. OpenStax puts it in practical terms: the volume is the area of the circular base times the height.
Think of a stack of thin coins. Each coin has area πr² and a tiny thickness. Stack enough of them to reach height h and the total space they fill is πr²h. The same idea works for any prism, which is why a box is length × width × height: base area times height.
How to calculate cylinder volume step by step
- Measure the radius. Measure across the circle at its widest point to get the diameter, then halve it. If you are measuring the outside of a pipe or tank, remember that wall thickness reduces the inside volume.
- Measure the height. Measure straight between the two flat ends, not along a slanted side.
- Put both in the same unit. BBC Bitesize is explicit that all lengths must use the same units before you calculate volume.
- Square the radius. Multiply r by itself.
- Multiply by π, then by h. Use the π key on a calculator for the best accuracy.
- Write the unit as cubed. Inches become cubic inches (in³), centimeters become cm³.
- Round at the end. Keep extra digits during the calculation and round only the final answer. Our guide to rounding to decimal places covers the rules and the common mistakes.
Worked example 1: radius and height given
Take a cylinder with a radius of 2 inches and a height of 7 inches. K12 LibreTexts works this exact case using 3.14 for π:
V = 3.14 × 2² × 7 = 3.14 × 4 × 7 = 87.92 in³
With a calculator's full π you get 87.96 in³. The small gap comes only from rounding π to 3.14. For homework, use whichever value your teacher specifies. For real measurements, use the calculator's π.
Worked example 2: a larger right cylinder
OpenStax solves a right cylinder with a radius of 5 inches and a height of 12 inches:
V = π × 5² × 12 = π × 25 × 12 = 300π ≈ 942.48 in³
Notice that you can leave the answer as 300π when an exact value is wanted, and convert to a decimal only when you need a number for building, ordering or filling something.
When you are given the diameter
Most real objects are labeled by diameter: a 4-inch pipe, a 6-foot tank, a 3-inch can. Halve the diameter first. BBC Bitesize explains that the diameter d must be halved to get the radius r before you use V = πr²h.
Substituting r = d ÷ 2 gives a shortcut:
V = π × (d ÷ 2)² × h = πd²h ÷ 4Example: a coffee can with a 4-inch diameter and a 6-inch height.
- Radius: 4 ÷ 2 = 2 in
- Volume: π × 2² × 6 = 24π ≈ 75.40 in³
- Shortcut check: π × 4² × 6 ÷ 4 = π × 96 ÷ 4 = 24π ≈ 75.40 in³
The most common slip is plugging the diameter into the radius slot. Doubling the radius quadruples the volume, so this error makes your answer four times too large.
Converting to gallons, liters and other units
Calculate in cubic units first, then convert. Do not mix units inside the formula.
Metric: cm³ to liters
BBC Bitesize uses 1000 cm³ = 1 liter, so 502,400 cm³ becomes 502.4 liters. The same page separates the two ideas: the volume of a solid is in cubic units like cm³ or m³, while liquid capacity is in milliliters or liters. Also, 1 cm³ equals 1 milliliter, and 1 m³ equals 1000 liters.
US customary: cubic inches to gallons
The US liquid gallon is defined as 231 cubic inches, equal to 3.785411784 liters in NIST Handbook 44. So divide cubic inches by 231 to get gallons.
Example: a vertical water tank 6 feet across and 8 feet tall.
- Radius: 6 ÷ 2 = 3 ft
- Volume: π × 3² × 8 = 72π ≈ 226.19 ft³
- Convert to cubic inches: 1 ft³ = 1,728 in³, so 226.19 × 1,728 ≈ 390,860 in³
- Divide by 231: 390,860 ÷ 231 ≈ 1,692 gallons
Shortcut: one cubic foot holds about 7.48 US gallons (1,728 ÷ 231), so 226.19 × 7.48 gives the same answer to within rounding.
The tank's usable capacity will be a little less than this figure, because the calculation gives the inside volume to the brim and real tanks have fittings, domed tops and a safe fill line.
Common cylinder volume mistakes
- Using the diameter as the radius. The result is four times too big.
- Forgetting to square. Multiplying r by 2 instead of by itself gives a wrong answer that still looks plausible.
- Mixing units. A radius in inches with a height in feet will give a meaningless number. Convert one first.
- Rounding π too early. Using 3.14 on a large tank can shift the answer by several gallons. Use the full π and round at the end.
- Reporting square or plain units. Volume always has cubed units. If your answer says in² or cm², you have found an area.
- Measuring outside, needing inside. For storage and capacity, use the inside diameter.
Half a cylinder
A half cylinder, such as a semicircular channel or a half-round pipe section, is exactly half of a full cylinder cut along its axis. Take the full formula and halve it:
V = ½πr²h, or with the diameter, V = πd²h ÷ 8Here r is the radius of the semicircular end and h is the length of the piece.
Example: a half-round gutter section with a 3-inch radius and a 10-inch length.
V = ½ × π × 3² × 10 = 45π ≈ 141.37 in³
Cylindrical tanks: full, upright and lying down
The word "tank" hides three different situations.
A full tank
Use V = πr²h with the inside dimensions. If the tank lies on its side, the length of the tank is your h and the circular end still supplies r. For a horizontal tank of radius R and length L, that gives V = πR²L.
An upright tank, partly filled
This is easy. The liquid forms a shorter cylinder with the same radius, so replace h with the depth of the liquid. Math Is Fun works this kind of case: a tank with a radius of 0.9 m and water 1.7 m deep holds about 4.326 m³, or roughly 4,326 liters. Check: π × 0.9² × 1.7 ≈ 4.326.
A horizontal tank, partly filled
This is the hard one. When a cylinder lies on its side, the liquid's surface cuts across the circle, and the wet cross-section is a circular segment, not a full circle. The volume is the area of that segment multiplied by the tank's length. Depth and volume are therefore not proportional: a tank filled to half its diameter is half full, but one filled to a quarter of its diameter holds noticeably less than a quarter of the total.
The segment formula uses inverse cosine and is easy to get wrong by hand. For a fuel or water tank where accuracy matters, use the manufacturer's strapping chart (a depth-to-volume table) or have a professional calibrate the tank. A rough estimate with the simple formula will mislead you whenever the level is not at the exact midpoint.
Where this formula gets used
- Cooking and baking. Comparing a round cake pan or stockpot to a recipe's stated capacity. A 9-inch pan that is 2 inches deep has a radius of 4.5 in, so V = π × 4.5² × 2 ≈ 127.2 in³, or about 0.55 gallons.
- Plumbing and landscaping. Estimating water held in a pipe run or a round stock tank, or soil needed for a round planter.
- Engineering and fabrication. Sizing bar stock, pistons, hydraulic cylinders and drums.
- School geometry. The same formula appears in middle school, GCSE-style and college math courses, always with the same structure: base area times height.
Perspective: why we favor the formula, then the check
We build calculators for a living, and our view is simple: use the formula to understand the answer, then use a tool to avoid arithmetic slips. Almost every wrong cylinder volume we see comes from one of three things: diameter treated as radius, mixed units, or π rounded too early. None of these is a math problem. They are bookkeeping problems.
Our advice is to write the units next to every number as you go, state the radius explicitly on its own line, and sanity-check the result against something familiar. If your "1-gallon" can comes out at 40 gallons, a unit slipped somewhere. A quick estimate also helps: a cylinder is a little less than the box that wraps around it (about 78.5% of it, since π ÷ 4 ≈ 0.785), so if your result exceeds d × d × h, something is wrong.
Precision is what we care about most, and it should match what you are doing. Homework wants the rounding your teacher specifies. A tank order wants a safety margin. A recipe wants the nearest quarter cup.
— Nkosi
Skip the arithmetic with our free tools
If you would rather not square, multiply and convert by hand, MetriqaHub has free unit conversion tools for length, volume and mass, with instant results and no registration. Calculate the cylinder in cubic inches or centimeters, then convert to gallons or liters in a few seconds, and keep your attention on whether the answer makes sense.
Frequently asked questions
What is the formula for the volume of a cylinder?
The formula is V = πr²h, where r is the radius of the circular base and h is the height. Square the radius, multiply by π, then multiply by the height. The result is in cubic units.
How do I find cylinder volume from the diameter?
Halve the diameter to get the radius, then apply V = πr²h. You can also use V = πd²h ÷ 4 directly. Be sure the diameter and height are in the same unit before you multiply.
How many gallons is a cylinder?
Calculate the volume in cubic inches, then divide by 231, since a US gallon is 231 cubic inches. If you work in cubic feet, multiply by about 7.48. For liters from cm³, divide by 1,000.
What is the volume of a half cylinder?
It is half the volume of the full cylinder: V = ½πr²h. With a diameter, use V = πd²h ÷ 8. The radius belongs to the semicircular end, and h is the length of the piece.
Does the formula change if the cylinder is lying down?
For a full cylinder, no: use the length between the ends as h. For a partly filled cylinder lying down, the liquid cross-section is a circular segment, so you need a special formula or a depth chart instead of simple multiplication.
Sources
- BBC Bitesize: How to calculate the volume of cylinders and prisms
- BBC Bitesize: Surface area and volume of a cylinder, KS3 Maths
- Open University: Geometry, cylinders and shapes with a uniform cross-section
- OpenStax: Volume and Surface Area, Contemporary Mathematics
- K12 LibreTexts: Volume of Cylinders
- NIST Handbook 44, Appendix C: units and conversions
- Math Is Fun: Cylinder