Volume formula
Equation to Calculate Volume
The cylinder volume formula, what each symbol means, and a worked example you can copy — plus a live calculator to check your own numbers.
There is really only one formula to remember, and this page makes the equation to calculate volume stick. You will see the equation, what each letter stands for, the diameter version, and a worked example — then a calculator to try it yourself.
The formula looks abstract until you connect each symbol to something you can point at: r is how far it is from the middle of the end to the edge, h is how tall it stands, and pi is the fixed number that ties any circle's width to its area. Once those click, the equation is just base area, stretched upward.
How the calculation works
- Measure across the circular end — the diameter or radius.
- If you measured the diameter, halve it to get the radius r.
- Square the radius and multiply by π to get the base area.
- Multiply the base area by the height h: V = π r² h.
- Convert the result into your preferred unit above.
Getting an accurate measurement
If you can only reach the top, measure the diameter across the opening and halve it. Keep every measurement in the same system, and let the tool convert between units for you.
How the volume is worked out
The volume of a cylinder is:
V = π r² hA worked example
Worked example. Take a cylinder with a diameter of 20 cm (so a radius of 10 cm) and a height of 40 cm. The base area is π × 10² = 314.16 cm², and multiplying by the height gives a volume of about 12.57 litres (12,566 cm³ · 3.32 US gallons).
For anything that holds liquid, measure the inside of the cylinder — the wall takes up space that the contents cannot.
Conversions use standard factors: 1 US gallon = 231 in³, 1 Imperial gallon = 4.54609 L, 1 litre = 1000 cm³.
After you have your answer
The figure above is usually the start, not the finish. These are the questions that tend to come next, answered here so you do not have to run another search:
How do I rearrange it to find the height?
Divide the volume by the base area: h = V divided by (pi r^2). To find a radius from a known volume and height, use r = the square root of V divided by (pi h). The reverse-solver does both for you.
What is the surface area, while I am here?
The total surface area of a closed cylinder is 2 pi r^2 + 2 pi r h — the two circular ends plus the curved side. It is a different quantity from volume, but it uses the very same two measurements.
Why is the radius squared?
Because the base is a circle, and a circle's area already needs r squared. Multiplying by the height then stretches that flat area into a solid, which is why the final unit is always cubic.
How does the diameter version work?
If you are given the diameter, use V = pi (d/2)^2 h, which is the same as pi d^2 h divided by 4. Halving the diameter first is usually the cleaner route, and it is what the calculator does automatically.
Common uses
People reach for this in a range of situations:
- Checking a geometry homework answer
- Sizing a barrel, drum or planter
- Estimating pipe or duct volume
- Planning a DIY water feature
Common mistakes to avoid
The commonest slip is using the diameter where the formula wants the radius, which on its own quadruples the base area. Close behind is mixing units, such as a radius in centimetres with a height in metres. Keep every length in the same unit, or let the tool convert, and double-check whether you measured to the centre or across the whole width. When a figure looks surprising, that width measurement is almost always where the problem is hiding, so re-read it first.
One result, every unit
One number, many units. Whatever you enter, the result lists the same volume as litres, US gallons, Imperial gallons, millilitres, cubic centimetres, cubic inches, cubic feet, cubic yards and cubic metres at the same time. You almost never have to convert by hand: read the figure in the unit your job uses and copy any of the others straight from the breakdown. If you need a shareable version, the copy-link button preserves your exact inputs so a colleague opens the page with the same calculation already filled in.
What to work out next
Once you have your answer you may also want to work in cylinder volume gallons litres & liters. These related calculators pick up where this one leaves off:
The bottom line: with the radius or diameter and the height, the volume follows immediately, and the breakdown lets you hand the same number to anyone in the unit they prefer. Measure inside dimensions for anything that holds liquid, leave a little headspace at the top of a real container, and treat the geometric figure as a clean maximum rather than the final word on usable capacity.
Frequently asked questions
Is the volume of a cylinder squared or cubed?
Does this work for a tank or a pipe?
What is the cylinder volume formula?
V = π r² h. Using diameter, it becomes V = π (d/2)² h, which is the same as V = π d² h ÷ 4.