Formulas & Calculations · August 7, 2026

How to Find the Volume of a Cylinder Using Diameter

Find the volume of a cylinder using diameter with V = πd²h/4. Worked examples in cm, inches, liters and gallons, plus the common mistake to avoid.

Visual 3D cylinder diagram showing diameter and height measurements with volume formula

The volume of a cylinder using diameter is V = (π × d² × h) / 4, where d is the diameter and h is the height. Quick check: a cylinder 6 cm wide and 20 cm tall holds about 565 cm³, which is a little over half a liter. You do not need the radius at all. This guide shows the formula, why you divide by four, four worked examples with real objects, and the one mistake that trips up most people.

Prefer to skip the arithmetic? Our cylinder volume calculator does it in one step. But the math below is worth understanding, because it protects you from a silent error that makes answers four times too big.

Understanding Diameter vs Radius Comparison Infographic

The Formula for Cylinder Volume Using Diameter

The classic cylinder formula starts with the area of a circle formula using the radius:

V = π × r² × h

The radius is half the diameter, so r = d / 2. Substitute that in and you get the diameter version:

V = π × (d / 2)² × h
V = π × (d² / 4) × h
V = (π × d² × h) / 4

Both formulas give the same answer. You just pick the one that matches the measurement you already have. If your ruler or caliper gives you the full width across the circle, that is the diameter, so use the diameter formula directly.

Why Divide By Four Formula Breakdown Diagram

Why You Divide by Four

This is the part most guides gloss over. When you square the radius, you square half the diameter:

r² = (d / 2)² = d² / 4

Squaring the 1/2 turns it into 1/4. That is where the divide-by-four comes from. It is not an extra rule to memorize. It is just what happens when you square a halved number. Skip it, and your answer will be exactly four times too large, every single time.

Step by Step: From Diameter and Height to Volume

Step by Step Cylinder Volume from Diameter Infographic

Follow the same order every time and the arithmetic stays clean.

  1. Measure the diameter (d) and height (h) in the same unit. Both in cm, or both in inches. Mixing units is the fastest way to a wrong answer.
  2. Square the diameter. Multiply d × d.
  3. Multiply by the height. Take your squared diameter and multiply by h.
  4. Multiply by π (3.14159).
  5. Divide by 4. This is the correction that turns diameter into the right result.
  6. Attach the cube unit. Length in cm gives cm³. Length in inches gives in³.

If you want the answer in liters or gallons, convert at the end, after step 6. For step-by-step tank examples and conversion factors, see our complete guide on how to calculate cylinder capacity in gallons and cubic feet.

Four Worked Examples

Each example uses π = 3.14159 and states its rounding.

Example 1: Metric (cm to liters)

A small cylindrical drum measures 40 cm across and 60 cm tall.

V = (π × d² × h) / 4
V = (3.14159 × 40² × 60) / 4
V = (3.14159 × 1,600 × 60) / 4
V = (3.14159 × 96,000) / 4
V = 301,592.6 / 4
V = 75,398.2 cm³   (rounded to 1 decimal place)

To read this in liters, divide by 1,000: 75,398.2 cm³ = 75.4 liters. Sanity check: a drum roughly the size of a small trash bin holding about 75 liters looks right.

Worked Example 1 Metric Drum Diagram

Example 2: Imperial (inches to gallons)

A section of tube is 6 inches in diameter and 12 inches tall.

V = (3.14159 × 6² × 12) / 4
V = (3.14159 × 36 × 12) / 4
V = (3.14159 × 432) / 4
V = 1,357.2 / 4
V = 339.3 in³   (rounded to 1 decimal place)

Convert to US gallons by dividing by 231: 339.3 in³ ÷ 231 = 1.47 gallons. That matches a tube a little larger than a standard paint can, which sounds about right.

Worked Example 2 Imperial Tube Diagram

Example 3: A Standard Soda Can

Grab a 12 oz can from the fridge. The US standard is 6.6 cm in diameter and 12.2 cm tall (industry-standard 12 oz format).

V = (3.14159 × 6.6² × 12.2) / 4
V = (3.14159 × 43.56 × 12.2) / 4
V = (3.14159 × 531.432) / 4
V = 1,669.5 / 4
V = 417.4 cm³   (rounded to 1 decimal place)

The can holds 355 ml of liquid, which is 355 cm³. So where did the other ~62 cm³ go? That is headspace, the empty gap left at the top for carbonation pressure and for the drink to expand safely. The math matches the real object once you account for design. This is a great can to check the formula against, because you can verify every number yourself.

Worked Example 3 Soda Can Diagram

Example 4: A PVC Pipe and the Nominal Diameter Trap

Here is the edge case that catches contractors and DIYers. You want the water capacity of a 10-foot length of “4-inch” Schedule 40 PVC pipe.

The trap: a nominal 4-inch pipe is not 4 inches on the inside. Per ASTM D1785, Schedule 40 pipe in the 4-inch nominal size has an actual inner diameter of about 4.026 inches. For volume you want the space inside, so you use the inner diameter, not the label on the box.

Height is 10 feet, which is 120 inches. Both measurements are now in inches.

V = (3.14159 × 4.026² × 120) / 4
V = (3.14159 × 16.209 × 120) / 4
V = (3.14159 × 1,945.03) / 4
V = 6,110.6 / 4
V = 1,527.7 in³   (rounded to 1 decimal place)

In gallons: 1,527.7 in³ ÷ 231 = 6.61 gallons. If you had used the nominal 4.000 inches instead, you would land near 6.53 gallons, close but off. On a long run of pipe or a big tank, small diameter errors add up fast. For pipe walls, our hollow cylinder calculator handles the gap between inner and outer diameter.

Worked Example 4 PVC Pipe Nominal Diameter Trap Diagram

The Most Common Mistake With Diameter

The single biggest error is plugging the diameter straight into the radius formula:

Wrong:   V = π × d² × h        (this forgets the ÷ 4)
Right:   V = (π × d² × h) / 4

Because the radius formula expects , and d is twice r, using d where r belongs makes the width term four times too big. Your final volume comes out exactly 4× too large. It is a quiet mistake, since the number still looks plausible. A tank you think holds 400 liters really holds 100.

The Most Common Diameter Mistake Infographic

Two habits prevent it. First, if you like the radius formula, halve the diameter first and use cylinder volume using radius. Second, if you keep the diameter, never forget the divide-by-four step. Pick one method and stick with it.

Volume Unit Conversion Reference

Do the volume math first, then convert at the end using this table.

FromToDo this
cm³litersdivide by 1,000
litersmultiply by 1,000
in³US gallonsdivide by 231
ft³US gallonsmultiply by 7.481
in³cm³multiply by 16.387
ft³litersmultiply by 28.317

Keep length units consistent inside the formula. Convert to liters or gallons only after you have the raw cube result.

Frequently Asked Questions

Can you find the volume of a cylinder with only the diameter?

No. You also need the height. Diameter alone describes the circular face, not how tall the cylinder is.

What is the formula for cylinder volume using diameter?

V = (π × d² × h) / 4. Square the diameter, multiply by height and π, then divide by four.

Why do you divide by four when using diameter?

Because the radius is half the diameter, and squaring one half gives one quarter. So r² = (d/2)² = d²/4. The divide-by-four simply carries that quarter through the formula.

What happens if I use diameter instead of radius by mistake?

Your answer comes out four times too large. The diameter is twice the radius, and squaring doubles that error into a factor of four. Always divide by four when you work from diameter.

Is diameter the same as the width of the cylinder?

For a standard circular cylinder, yes. The diameter is the widest straight line across the circular face, which is the same as its full width.

How do I convert the answer to liters?

Work in centimeters, get the volume in cm³, then divide by 1,000. Example: a cylinder giving 75,398 cm³ equals 75.4 liters (75,398 ÷ 1,000).

How do I find the volume of a pipe using diameter?

Use the inner diameter, not the nominal label. A “4-inch” Schedule 40 pipe has an actual inner diameter near 4.026 inches (per ASTM D1785). Plug the inner diameter and the pipe length into V = (π × d² × h) / 4, then divide in³ by 231 for gallons. For a 10-foot run that gives about 6.61 gallons.

Should I use inner or outer diameter for a tank or pipe?

Use the inner diameter for the liquid capacity, since that is the space actually filled. Use the outer diameter only when you are measuring the material or the space the object takes up.

Sources and Verification

Soda can dimensions are the industry-standard US 12 oz format. Pipe dimensions reference ASTM D1785 for Schedule 40 PVC. The cylinder volume relationship is standard geometry (see Wolfram MathWorld and Math is Fun). Unit conversions follow standard values: 1 liter = 1,000 cm³, 1 US gallon = 231 in³, 1 ft³ = 7.481 US gallons. All calculations here were worked step by step and independently verified.