Math & Science

Volume Calculator

Volume and surface area for seven solids, with capacity in litres and gallons alongside.

Written and maintained by the MarsCalc Hub editorial team Formula checked against standard geometric formulas Updated

Enter dimensions in centimetres to read capacity directly in litres.

About the Volume Calculator

Seven solids, each with its own inputs: sphere, cylinder, cone, cube, rectangular box, square pyramid and capsule. Choose a shape, enter its dimensions, and you get the volume, the surface area where it applies, and the formula that produced the answer.

Results also come through in litres and gallons, which is what you usually want when the shape is holding something rather than just occupying space. A cylinder's volume in cubic centimetres is abstract; the same figure in litres tells you whether it fits in the boot of a car.

Keep all dimensions in the same unit and the answer comes back in that unit cubed. The page below covers the conversions, and the mistake almost everyone makes with them.

How to use the Volume Calculator

  1. Choose a shape. The input fields change to match it.
  2. Enter the dimensions in centimetres.
  3. Select Calculate volume.
  4. Read litres and gallons for capacity, or the raw cubic figure for geometry.
  5. Surface area is shown where it is defined for that solid.

Volume formulas: cylinder, cube, cone, sphere and pyramid

SolidVolumeSurface area
SphereV = 4/3 πr³S = 4πr²
CylinderV = πr²hS = 2πr(r + h)
ConeV = 1/3 πr²hS = πr(r + slant)
CubeV = s³S = 6s²
Rectangular boxV = l × w × hS = 2(lw + lh + wh)
Square pyramidV = 1/3 b²hBase plus four triangles
CapsuleV = πr²h + 4/3 πr³S = 2πr(2r + h)
Triangular prismV = ½ × b × h × lengthTwo triangles plus three rectangles

The same formulas in words, with a quick example for each:

  • Cylinder volume formula — V = πr²h. Radius 3, height 10: about 282.7 cubic units.
  • Cube volume formula — V = s³. A 4 cm cube holds 64 cm³.
  • Cone formula — V = ⅓πr²h. Radius 3, height 10: about 94.2, exactly a third of the cylinder.
  • Sphere formula — V = ⁴⁄₃πr³. Radius 3: about 113.1.
  • Volume of a pyramid — V = ⅓ × base area × height. A 6 × 6 base, 9 high: 108.
  • Rectangular prism formula — V = l × w × h. 5 × 4 × 3 = 60.
  • Triangular prism formula — V = ½ × base × triangle height × length. Base 4, height 3, length 10: 60.

Worked example

A cylindrical water tank has a radius of 0.5 m and a height of 1.2 m. What does it hold?

V = πr²h = π × 0.25 × 1.2 = 0.9425 cubic metres.

One cubic metre is 1,000 litres.

942.5 litres

Why a cone is exactly a third of a cylinder

Take a cone and a cylinder with the same base radius and the same height. Fill the cone with water and pour it into the cylinder. It takes exactly three cone-fulls to fill it — every time, for any radius and any height.

This is not a coincidence or an approximation. It falls out of integrating the cross-sectional area up the height: the cone's radius shrinks linearly from base to tip, and integrating a squared linear taper produces exactly the factor of one third. The same relationship holds for a pyramid and its matching prism.

The sphere has its own elegant version. A sphere occupies exactly two thirds of the smallest cylinder that encloses it — a result Archimedes was proud enough of to have engraved on his tomb.

Volume and capacity conversions

FromToRelationship
Cubic centimetresLitres÷ 1,000
Cubic metresLitres× 1,000
LitresUS gallons÷ 3.78541
LitresUK gallons÷ 4.54609
Cubic inchesCubic feet÷ 1,728
Cubic feetCubic yards÷ 27
Cubic feetCubic metres× 0.0283168

Volume factors are length factors cubed. One foot is 12 inches, so one cubic foot is 12³ = 1,728 cubic inches, not 12. And US and UK gallons differ by about 20% — check which one a figure refers to before relying on it.

What a capsule is, and where you meet one

A capsule is a cylinder with a hemisphere stuck on each end — the shape of a pill, a propane tank or a pressure vessel. Its volume is the cylinder plus one whole sphere, because two hemispheres make a sphere.

The height input here means the cylindrical section only, not the overall length. Total length is that height plus twice the radius. Getting this wrong is the usual reason a capsule answer comes out too large.

Practical volume jobs

  • Concrete — work in cubic metres or cubic yards, and add about 10% for spillage and uneven ground.
  • Swimming pools — average the shallow and deep end depths, then treat it as a box. Good to within a few percent for most pools.
  • Aquariums — subtract 10% for gravel and decoration to get the actual water volume.
  • Shipping — freight is billed on cubic metres. The CBM calculator handles volumetric weight too.

For storage tanks including partly-filled ones, the tank area calculator does the harder geometry. For flat surfaces, use the area calculator.

Pool volume calculator: gallons in a pool (pool gallon calculator)

Use the average depth: add the shallow and deep ends and halve it. Then use the rule for your shape.

Pool shapeUS gallons
Rectanglelength × width × average depth × 7.48
Rounddiameter × diameter × average depth × 5.9
Ovallength × width × average depth × 5.9

All measurements in feet. A 20 × 10 ft pool, 3 ft at one end and 9 ft at the other, has an average depth of 6 ft: 20 × 10 × 6 × 7.48 = 8,976 gallons. The same method works for ponds and aquariums.

Pipe and tube volume calculator

A pipe is a long cylinder. Use the inside diameter.

Volume = π × (inside diameter ÷ 2)² × length

100 ft of 6-inch pipe holds about 147 US gallons. 100 ft of 4-inch pipe holds about 65 gallons. Choose Cylinder above and enter the radius and length.

Concrete, soil and mulch in cubic yards

Concrete and landscaping materials are sold by the cubic yard. Work in feet, then divide by 27.

Cubic yards = length (ft) × width (ft) × depth (ft) ÷ 27

A 10 × 10 ft slab, 4 inches (0.333 ft) thick: 10 × 10 × 0.333 ÷ 27 = 1.23 cubic yards. Order about 10% extra for spillage and uneven ground.

Aquarium and fish tank volume calculator

For a rectangular aquarium measured in inches, divide length × width × height by 231 to get US gallons:

Gallons = L × W × H (inches) ÷ 231

A standard 48 × 13 × 21 inch tank holds 13,104 ÷ 231 = 56.7 gallons — sold as a “55-gallon” aquarium, since gravel and decor take up space. The same rule works as an aquarium size calculator, a pond volume calculator for straight-sided ponds, or a quick tank size calculator.

Cubic inches to cubic feet, and cu ft to cu yd

  • Cubic inches to cubic feet: divide by 1,728 (12 × 12 × 12). 3,456 in³ = 2 ft³.
  • Cu ft to cu yd: divide by 27 (3 × 3 × 3). 54 ft³ = 2 yd³.
  • Cubic feet to gallons: multiply by 7.48.

Other ways to use this calculator

Seven shapes cover most real-world volume jobs.

  • Cylinder volume calculator (tube and pipe too) — choose Cylinder and use the inside radius.
  • Pool, pond and aquarium volume calculator — use the gallons formulas above or our pool volume guide.
  • Tank volume calculator in gallons — results show litres and US gallons.
  • Soil, dirt and concrete volume calculator — use Rectangular box, then divide cubic feet by 27 for cubic yards.
  • Sphere volume calculator — choose Sphere and enter the radius.
  • Swimming pool volume calculator — measure length, width and average depth, then use the pool section above.
  • Volume of a cone calculator — choose Cone and enter radius and height.
  • Cone volume — choose Cone and enter radius and height.
  • Capacity calculator — results show litres and US gallons as well as cubic units.
  • Pipe volume calculator — see the pipe and tube section above.

Related guides

Frequently asked questions

The volume of a sphere is V = 4/3 πr³. For a radius of 6 cm: 6³ = 216, then 4/3 × π × 216 = 904.8 cubic centimetres, or about 0.9 litres. Cube the radius before applying the rest. If you have the diameter, halve it first — using diameter in place of radius makes the answer eight times too large, since the error is cubed.

Divide by 1,000. One litre is exactly 1,000 cubic centimetres, so 2,500 cm³ is 2.5 litres. Going the other way, one cubic metre is 1,000 litres. Remember that volume conversion factors are length factors cubed — a cubic foot is 1,728 cubic inches, not 12, because 12³ = 1,728.

Because the cone's radius shrinks steadily from base to tip, and integrating that squared taper up the height produces exactly one third. It is an exact result, not an approximation: three cone-fulls of water fill a cylinder of matching radius and height every time. The same one-third relationship holds between any pyramid and the prism with the same base and height.

A capsule is a cylinder with a hemisphere on each end — the shape of a pill, a propane tank or a pressure vessel. Its volume is the cylinder plus one full sphere, since two hemispheres make a sphere. Enter the height of the cylindrical section only, not the overall length; the total length is that height plus twice the radius.

For a rectangular pool, multiply length × width × average depth in feet, then multiply by 7.48. A 20 × 10 ft pool with a 6 ft average depth holds about 8,976 gallons. For round pools, use diameter × diameter × depth × 5.9.

Multiply length × width × thickness in feet and divide by 27 to get cubic yards. A 10 × 10 ft slab 4 inches thick needs about 1.23 cubic yards. Add around 10% for waste.

V = πr²h: multiply pi by the radius squared, then by the height. A cylinder with a 3 cm radius and 10 cm height holds about 282.7 cm³. Use half the diameter as the radius.

Sources and further reading

  1. NIST — Guide for the Use of the International System of Units — volume units and conversion factors
  2. NIST — Units of volume and capacity — litre and cubic metre definitions
  3. Volume — Encyclopaedia Britannica — standard solid geometry formulas