ThisCalculator

Conversions

Diameter x Height Volume Calculator: How It Works

Updated · Standard formula, shown below

Volume (cubic inches) 2,714.34 in³
Volume (liters)
44.48 L
Result
Volume (US gallons)
11.75 gal
Result
Diameter
12 in
You entered

Diameter x Height Volume Calculator: How It Works

This calculator works out the volume of a cylinder when you enter its diameter and height. You type in the diameter and height in any consistent unit (inches, feet, centimeters, meters), and the calculator returns the volume in cubic units, plus the volume in liters and gallons for convenience. The formula used is the standard cylinder volume formula: V = π × (d/2)² × h, where d is diameter and h is height.

Formula

The volume of a cylinder is calculated using the formula:

V = π × r² × h

Where:

  • V = volume (cubic units, e.g., in³, cm³, ft³)
  • Ï€ (pi) ≈ 3.14159
  • r = radius = diameter ÷ 2 (same unit as diameter)
  • h = height (same unit as diameter)

Since the calculator asks for diameter, you can also write it as:

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

This formula assumes a right circular cylinder—a straight-sided shape with a circular base and top. It works for any cylinder where the cross-section is a circle and the height is perpendicular to the base.

Worked Example

Using the default values from the calculator above: diameter = 12 inches, height = 24 inches.

  1. Find the radius: r = d/2 = 12/2 = 6 inches
  2. Square the radius: r² = 6² = 36 in²
  3. Multiply by π: 36 × 3.14159 = 113.097 in²
  4. Multiply by height: 113.097 × 24 = 2714.34 in³

So the volume is 2714.34 cubic inches.

To convert to liters: 2714.34 in³ × 0.0163871 = 44.48 liters

To convert to US gallons: 2714.34 in³ × 0.004329 = 11.75 US gallons

These match the calculator’s outputs exactly (rounded to 2 decimals).

Why Diameter Instead of Radius?

Many people know the formula with radius, but in real life you usually measure the diameter—it’s easier to measure across the opening of a pipe, tank, or cup than to find the exact center and measure to the edge. A ruler or tape measure naturally gives you the diameter. This calculator saves you the step of dividing by 2 manually, though the formula still uses radius internally.

If you already have the radius, just double it to get the diameter and enter that. Or you can use a radius-based calculator instead.

Common Uses for Cylinder Volume

  • Aquariums and fish tanks: cylindrical tanks are less common but exist; knowing volume helps with dosing treatments and fish stocking.
  • Pipes and plumbing: volume per foot of pipe determines water capacity or flow timing.
  • Storage tanks: fuel, water, or chemical tanks are often cylindrical; volume tells you capacity.
  • Cooking and baking: cake pans, stock pots, and cylindrical containers—volume helps scale recipes.
  • Concrete and fill: for cylindrical footings or posts, volume tells you how much concrete to order.
  • Packaging: cans, bottles, and jars—volume for labeling or shipping.

Unit Conversions and Common Mistakes

The calculator gives volume in cubic inches by default, but you can enter any unit. The key is to use the same unit for diameter and height. If you mix inches and feet, the result is wrong—you’ll get a number that’s off by a factor of 12 or 144.

Common conversion factors:

  • 1 cubic inch = 16.3871 milliliters = 0.0163871 liters
  • 1 cubic inch = 0.004329 US gallons
  • 1 cubic foot = 7.48052 US gallons
  • 1 liter = 0.264172 US gallons
  • 1 cubic meter = 1000 liters = 264.172 US gallons

A frequent mistake is using the diameter in the formula without halving it. For example, using d=12 directly in π×d²×h gives 10857 in³—four times the correct answer. Always remember to divide by 2 first.

Another common error is confusing US gallons with imperial gallons (which are larger: 1 imperial gallon = 1.20095 US gallons). This calculator uses US gallons.

Limitations of the Formula

The formula assumes a perfect cylinder with uniform diameter and straight sides. Real-world objects often deviate:

  • Tapered containers (like buckets or flower pots) are not cylinders—they’re frustums, needing a different formula.
  • Elliptical or oval tanks need an ellipse area formula instead.
  • Partial fills (liquid at a certain depth) require segment area calculations, not the full cylinder formula.
  • Thick walls (pipe walls) mean the outer diameter gives total volume, but the inner diameter gives the liquid capacity. Measure the inside for capacity.

For a partially filled horizontal cylinder, the volume is more complex and depends on the fill height—this calculator only works for full cylinders.

How to Measure Diameter and Height Correctly

For accurate results, measure carefully:

  1. Diameter: Measure across the widest part of the circular opening, passing through the center. If using a ruler, place it across the top edge. For a pipe, measure the inside diameter for capacity, or outside diameter for total volume.
  2. Height: Measure from the bottom to the top along the side, perpendicular to the base. For a tank with a dome or curved bottom, measure only the straight cylindrical section.
  3. Units: Use the same unit for both. If you measure in inches, both should be inches. If you measure in centimeters, both in centimeters.

If the object is not perfectly round, measure the diameter in a few places and average them. For a slightly oval shape, the cylinder formula will be approximate.

Frequently Asked Questions

How do I find the volume of a cylinder if I only know the radius?

Double the radius to get the diameter, then use this calculator. Or use the formula V = π × r² × h directly. For example, radius = 5 cm, height = 10 cm: V = π × 25 × 10 = 785.4 cm³.

What is the difference between diameter and circumference?

Diameter is the straight-line distance across the circle through the center. Circumference is the distance around the circle. They are related by C = π × d. You can measure circumference with a tape measure and then divide by π to get diameter.

Can I use this calculator for a cone or sphere?

No. A cone has a different formula: V = (1/3) × π × r² × h. A sphere has V = (4/3) × π × r³. This calculator is only for cylinders with straight sides and circular bases.

How do I convert cubic inches to gallons?

Multiply cubic inches by 0.004329 to get US gallons. For example, 2714.34 in³ × 0.004329 = 11.75 gallons. To convert to imperial gallons, multiply by 0.00360465.

What if my cylinder is lying on its side and only partially full?

This calculator assumes a full cylinder. For a horizontal cylinder with partial fill, you need the segment area formula. The volume is the segment area times the length. For a fill height h (from bottom) in a cylinder of radius r, the segment area is r² × arccos((r-h)/r) – (r-h)×sqrt(2rh – h²).

Does the calculator work for metric measurements?

Yes. Enter diameter and height in centimeters or meters, and the volume will be in cubic centimeters or cubic meters. The liter and gallon outputs automatically convert based on the cubic inch default, so if you enter metric, the liter output will be correct, but the gallon output will be based on the conversion from cubic inches—so it’s better to use the cubic volume output and convert manually if you enter metric.

Related

Formula used
in d | Diameter | in | 12 | 0
in h | Height | in | 24 | 0
out vol_cu | Volume (cubic inches) | in³ | pi * (d/2)^2 * h | 2
out vol_l | Volume (liters) | L | (pi * (d/2)^2 * h) * 0.0163871 | 2
out vol_gal | Volume (US gallons) | gal | (pi * (d/2)^2 * h) * 0.004329 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.