Volume of a cylinder with diameter
For the volume of a cylinder with diameter d instead of radius, use V = πd²h ÷ 4: square the diameter, multiply by π and by the height, then divide by 4. It gives exactly the same result as V = πr²h, without halving the diameter first.
Contents
V = π × d² × h ÷ 4. With d = 6 in and h = 10 in: π × 36 × 10 ÷ 4 = 282.74 in³ (1.224 US gal).
The calculator above takes the diameter directly and shows the volume with gallons and liters. Below: where the diameter formula comes from, examples in inches, feet, centimeters and meters, a table of volumes per unit of height, and how to work back from a volume to the diameter.
Cylinder volume formula with diameter
The standard formula is V = πr²h. The radius is half the diameter, r = d ÷ 2, so r² = d² ÷ 4. Substituting gives:
V = π × d² × h ÷ 4
Both forms are exact; they differ only in when you divide. Some people prefer to halve the diameter and use the radius form, which is explained step by step in the guide on how to find the volume of a cylinder. Others like the diameter form because the diameter is what a ruler or caliper actually measures. The factor π ÷ 4 is about 0.7854, so a quick mental version is V ≈ 0.7854 × d² × h.
Why 0.7854? It is the share of a square that a circle fills when it just fits inside. A cylinder of diameter d and height h fills about 78.5 % of the box d × d × h around it.
How to calculate the volume with the diameter
- Measure the diameterMeasure across the circular end, through the center. For capacity, use the inside diameter.
- Measure the heightUse the same unit as the diameter. For a pipe or a log lying down, the height is its length.
- Square the diameterMultiply it by itself: 6 × 6 = 36.
- Multiply by π and by the heightπ × 36 × 10 ≈ 1,130.97.
- Divide by 41,130.97 ÷ 4 ≈ 282.74 in³. The unit is the cube of the length unit.
Worked examples
A cylinder 6 in across and 10 in tall
d² = 36. π × 36 ≈ 113.10, which is four times the base area. Times the height: 113.10 × 10 ≈ 1,130.97. Divide by 4: 282.74 in³. Divided by 231, that is about 1.224 US gallons. Check with the radius: r = 3 in, π × 9 × 10 ≈ 282.74 in³. Same answer.
A cylindrical barrel with a diameter of 2 feet
A barrel 2 ft across and 3 ft tall: d² = 4, π × 4 × 3 ÷ 4 = 3π ≈ 9.4248 ft³. One cubic foot holds 7.48052 US gallons, so the barrel holds about 70.5 gallons. If the same barrel were 3.5 ft tall, it would hold about 11.00 ft³, or 82.25 gallons. Each foot of height adds π ≈ 3.1416 ft³, about 23.5 gallons.
A glass 8 cm across and 12 cm tall
d² = 64. π × 64 × 12 ÷ 4 = 192π ≈ 603.19 cm³. At 1,000 cm³ per liter, the glass holds about 0.603 L, or 603 mL if filled to the brim.
A drainage pipe section 0.5 m across and 1.5 m long
d² = 0.25. π × 0.25 × 1.5 ÷ 4 ≈ 0.29452 m³, which is about 294.5 L. For long pipe runs where you need the water held per foot or per meter, the pipe volume calculator gives that figure directly.
Mixed units: 18 in across, 4 ft tall
The diameter is in inches and the height in feet, so convert one of them. In feet, d = 18 ÷ 12 = 1.5 ft. Then d² = 2.25, and π × 2.25 × 4 ÷ 4 ≈ 7.0686 ft³. Multiplied by 7.48052, that is about 52.88 US gallons. Working in inches instead (d = 18 in, h = 48 in) gives about 12,214.5 in³, which is the same volume divided into 1,728 in³ per cubic foot.
The 0.7854 shortcut
For a quick estimate, multiply d² × h by 0.7854. A tube 10 in across and 20 in long: 0.7854 × 100 × 20 = 1,570.8 in³. The exact value with full π is 1,570.80 in³, about 6.80 US gallons, so the shortcut is accurate to the rounding shown. It is handy on a phone calculator without a π key.
Volume per unit of height, by diameter
For a given diameter, the volume grows in a straight line with the height. These tables give the volume for one unit of height; multiply by your height to get the total. Values use the full value of π.
| Inside diameter | in³ per inch of height | US gallons per foot of height |
|---|---|---|
| 1 in | 0.7854 | 0.0408 |
| 2 in | 3.1416 | 0.1632 |
| 3 in | 7.0686 | 0.3672 |
| 4 in | 12.566 | 0.6528 |
| 6 in | 28.274 | 1.4688 |
| 8 in | 50.265 | 2.6112 |
| 10 in | 78.540 | 4.0800 |
| 12 in | 113.10 | 5.8752 |
| 18 in | 254.47 | 13.219 |
| 24 in | 452.39 | 23.501 |
| Inside diameter | cm³ per cm of height | Liters per meter of height |
|---|---|---|
| 5 cm | 19.635 | 1.9635 |
| 10 cm | 78.540 | 7.8540 |
| 20 cm | 314.16 | 31.416 |
| 30 cm | 706.86 | 70.686 |
| 50 cm | 1,963.5 | 196.35 |
| 100 cm | 7,854.0 | 785.40 |
Notice that doubling the diameter multiplies each value by four: 10 cm gives 78.540 cm³ per cm, 20 cm gives 314.16. That is the squared term at work.
How to find the diameter of a cylinder
The diameter of a cylinder is the width of its circular base, measured through the center. Depending on what you can measure, there are three ways to get it.
Measure it directly
Lay a ruler or a caliper across the end so that it passes through the center: the longest distance across the circle is the diameter. On a pipe, the inside diameter (the bore) sets the capacity, while the outside diameter sets what fittings it takes. The difference between the two is twice the wall thickness, which matters for the volume of a hollow cylinder.
From the circumference
On a tank, a column or a tree, it is easier to wrap a tape around the outside. Then d = C ÷ π. A circumference of 47.1 in gives d ≈ 47.1 ÷ 3.14159 ≈ 14.99 in, so about 15 in.
From the volume and the height
Turn the formula around: d = 2 × √(V ÷ (π × h)), or d = √(4V ÷ (π × h)). A container that must hold 1,000 cm³ (one liter) with a height of 20 cm needs an inside diameter of 2 × √(1,000 ÷ (π × 20)) ≈ 7.98 cm. A tank that must hold 100 US gallons in 48 in of height: 100 × 231 = 23,100 in³, then d = 2 × √(23,100 ÷ (π × 48)) ≈ 24.75 in. The same reverse working, aimed at the radius, is on the page about the radius of a cylinder; to find the missing height instead, see how to find the height of a cylinder.
Surface area of a cylinder with the diameter
The same substitution works for area. Each circular end has an area of πd² ÷ 4, and the curved side unrolls to a rectangle π × d wide and h tall. The total area is:
A = πd² ÷ 2 + π × d × h
For d = 6 in and h = 10 in: the two ends make π × 36 ÷ 2 ≈ 56.55 in², the side makes π × 6 × 10 ≈ 188.50 in², and the total is about 245.04 in². The full method, with open-top containers and lateral area, is on the page about the surface area of a cylinder.
Mistakes to avoid with the diameter
Never put the diameter into V = πr²h. For the 6 in by 10 in cylinder, π × 6² × 10 gives 1,130.97 in³, four times the real 282.74 in³. Either halve the diameter first or divide by 4 at the end, never neither.
- Dividing by 2 instead of 4. In the diameter form, the 4 comes from squaring the 2. Dividing by 2 doubles the answer.
- Measuring off-center. A line across a circle that misses the center is shorter than the diameter. Look for the widest reading.
- Mixing inside and outside diameters. Capacity uses the inside diameter; the weight of a solid bar uses the outside.
- Different units. A diameter in inches and a height in feet must be converted to one unit before you multiply. Mixed-unit examples are worked in the guide on finding the volume of a cylinder.
To check any of these numbers, enter the diameter in the cylinder volume calculator and switch it to diameter input; the result should match to the last rounded digit.
FAQ
What is the cylinder volume formula with the diameter?
V = πd²h ÷ 4, where d is the diameter and h the height. It is the usual V = πr²h with r replaced by d ÷ 2: (d ÷ 2)² = d² ÷ 4. A cylinder 6 in across and 10 in tall holds π × 36 × 10 ÷ 4 ≈ 282.74 in³.
How do I find the diameter of a cylinder?
Measure straight across the circular end, through the center. If you cannot reach across, wrap a tape around it and divide the circumference by π. From a known volume and height, use d = 2 × √(V ÷ (πh)).
What is the volume of a cylindrical barrel with a diameter of 2 feet?
It depends on the height. With a diameter of 2 ft the base area is π × 2² ÷ 4 = π ≈ 3.1416 ft², so each foot of height holds about 3.1416 ft³, or 23.5 US gallons. A barrel 3 ft tall holds about 9.4248 ft³, or 70.5 US gallons.
Is the diameter twice the radius?
Yes, d = 2r. The radius runs from the center to the edge, the diameter from edge to edge through the center. Using the diameter in V = πr²h by mistake makes the volume four times too big.
How do you find the surface area of a cylinder with the diameter?
Total area A = πd²/2 + πdh: the two circular ends plus the curved side. For d = 6 in and h = 10 in, A ≈ 56.55 + 188.50 = 245.04 in².
Related
- How to find the volumeHow to find the volume of a cylinder: square the radius, multiply by π and the height. Worked examples in inches, feet, cm and m, plus common mistakes.
- Radius of a cylinderHow to find the radius of a cylinder from its volume, surface area, circumference or diameter. Formulas, calculator and worked examples in inches and cm.
- Pipe volumePipe volume calculator: V = π × r² × L from the inside diameter. Gallons of water per foot of pipe, liters per meter, a full chart and worked examples.
Updated October 12, 2026