Volume Calculator

Volume of six common solids in one tool, with the matching formula shown.

What does this calculator do?

One tool for the volume of the six most common solids: cube, rectangular prism (box), right cylinder, right cone, sphere and right square pyramid. Pick the shape, enter the dimensions it asks for, and the calculator applies the matching formula with the substitution shown. Use any length unit — the volume comes out in that unit cubed (centimetres give cm³, which divides by 1000 into litres).

Formula

One formula per shape:

Cube: V = a³
Prism: V = l × w × h
Cylinder: V = πr²h
Cone: V = ⅓πr²h
Sphere: V = (4/3)πr³
Square pyramid: V = ⅓a²h
Common solids diagramOutlines of a cube, a cylinder and a sphere, the shape families this calculator covers.
Diagram not to scale.

How to use it

Choose the shape first — the input fields adapt. Enter every dimension in the same unit. To convert the result between m³, ft³, litres or gallons, use the Volume Converter linked below.

Worked example

Cube with edge 3: V = 27. Switching to sphere with r = 3 gives V = (4/3)π × 27 = 113.0973; a cone with r = 3, h = 4 gives V = 37.6991.

Formula version1.0.0
FormulaCube: V = a³ Prism: V = l × w × h Cylinder: V = πr²h Cone: V = ⅓πr²h Sphere: V = (4/3)πr³ Square pyramid: V = ⅓a²h
Precision4 decimals

Frequently asked questions

Why do the cone and pyramid formulas have the ⅓ factor?

Any solid that tapers linearly from a base to a point holds exactly one third of the prism or cylinder with the same base and height — a classical geometry result.

How do I go from cm³ to litres?

Divide by 1000 (1 L = 1000 cm³ = 1 dm³). Enter dimensions in decimetres and the result is already in litres; the Volume Converter handles other units.

Which shape approximates my container best?

Match the closest ideal solid: cans and pipes → cylinder, boxes → prism, balls → sphere, funnels → cone. Real containers with rounded corners hold slightly less than the ideal formula suggests.

Sources

Related calculators

Last updated: 2026-07-31 · v1.0.0 · Report an error