Volume Calculator

How to use it

  1. Pick a shape, choose the unit you measured in, and type the dimensions. Fractions (3/4), mixed numbers (2 1/2) and decimals all work.
  2. The volume appears exactly, with π kept as π for round shapes (a cylinder of radius 3 and height 5 is 45π cubic units), and as a decimal.
  3. The table converts it to cubic centimeters, cubic meters, liters, milliliters, cubic inches, feet and yards, US gallons, quarts, cups and fluid ounces, and imperial gallons.

The formulas

ShapeVolume
Cubea³
Rectangular prism (box)l × w × h
Cylinderπr²h
Cone⅓πr²h
Sphere⁴⁄₃πr³
Hemisphere⅔πr³
Pyramid (rectangular base)⅓ × base area × height = ⅓lwh
Triangular prism½ × base × triangle height × length
Capsuleπr²h + ⁴⁄₃πr³ (a cylinder with a hemisphere on each end)
Ellipsoid⁴⁄₃πabc (semi-axes a, b, c)
Conical frustum⅓πh(R² + Rr + r²)
Tube (pipe)π(R² − r²)h

A cone holds exactly a third of the cylinder with the same base and height, and a pyramid a third of the matching box, which is where the ⅓ comes from. Radius is half the diameter: a can 8 cm across has r = 4 cm.

Converting to liters and gallons

Every conversion goes through exact definitions rather than rounded factors: an inch is exactly 2.54 cm (so a foot is 0.3048 m), a liter is exactly one cubic decimeter (1,000 cm³), a US gallon is exactly 231 cubic inches, which makes it 3.785411784 liters, and an imperial gallon is exactly 4.54609 liters, about 20% more than a US gallon. A cubic foot is 28.316846592 liters, or about 7.48 US gallons, the number to use for a pool, a tank or a raised bed measured in feet. US cups and fluid ounces here are the gallon-based customary units (16 cups or 128 fluid ounces to the gallon).

What we tested

On October 15, 2026 we ran the page’s own functions on 2,400 random solids, about 200 of each shape, with whole-number, decimal and fractional dimensions in all six length units, and compared them with the SymPy computer-algebra library: all 2,303 volumes matched SymPy exactly (including the factor of π), the 97 tubes with an inner radius at least as large as the outer one were refused, and all 29,939 unit conversions matched the exact definitions above. In Chromium: the default cylinder (r 3, h 5 cm) showed 45π cm³ ≈ 141.37 cm³ and 0.141 liters; all 12 shapes drew a picture and a volume; a 1 ft cube converted to 1,728 in³, 28.316847 liters and 7.4805195 US gallons; a sphere of radius 1 1/2 in gave (9/2)π in³; a tube with the inner radius larger than the outer showed a message; the page survived a reload and fitted a 390 px phone with no errors. We also checked the check: defining the US gallon as 230 cubic inches instead of 231 made every case fail.

Frequently Asked Questions

How do I calculate the volume of a cylinder?+
Multiply π by the radius squared and by the height: V = πr²h. A cylinder 6 cm across (radius 3 cm) and 5 cm tall holds 45π ≈ 141.37 cm³, about 0.141 liters.
How many gallons are in a cubic foot?+
About 7.48 US gallons (exactly 1,728 ÷ 231), or about 6.23 imperial gallons.
How do I convert cubic centimeters to liters?+
Divide by 1,000: one liter is exactly 1,000 cm³, and one milliliter is one cubic centimeter.
What is the volume of a sphere?+
V = ⁴⁄₃πr³. A ball of radius 10 cm holds about 4,188.8 cm³, or 4.19 liters.
Why is the cone formula one third of the cylinder?+
A cone holds exactly one third of the cylinder with the same base and height, a result known since Archimedes, so V = ⅓πr²h.
Can I mix units?+
Measure every dimension in the same unit and pick it in the menu; the table then converts the volume to other units.

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service