Skip to content

Volume Calculator — 8 Common 3D Shapes

Eight 3D shapes, one widget. Sister calculator to /math/area/.

Eight common 3D shapes are covered: rectangular prism (box), cube, sphere, cylinder, cone, pyramid, torus (donut), and ellipsoid. Inputs are unitless — the output is in the cube of whatever you typed in. Use feet in to get cubic feet, meters in to get cubic meters.

Volume
240.00 u³

Output is in the cube of whatever linear unit you typed (meters in → cubic meters out, inches in → cubic inches out).

How to use

  1. Pick the shape

    Dropdown swaps the input fields. Each shape's parameters are labelled in standard textbook nomenclature (r for radius, h for height, etc.).

  2. Enter the measurements

    All in the same linear unit. The widget doesn't care which unit — meters, feet, inches — only that the inputs agree.

  3. Read the volume

    Result is in the cube of your input unit. 2 m × 3 m × 4 m = 24 m³; 6 in × 12 in × 8 in = 576 in³.

Formula reference

ShapeFormula
Rectangular prismV = l × w × h
CubeV = s³
SphereV = ⁴⁄₃ · π · r³
CylinderV = π · r² · h
ConeV = ⅓ · π · r² · h
Pyramid (rectangular base)V = ⅓ · l · w · h
TorusV = 2 · π² · R · r²
EllipsoidV = ⁴⁄₃ · π · a · b · c

Frequently asked questions

What unit does the result use?
Whatever you typed in, cubed. Meters in → cubic meters out. The widget intentionally doesn't pick a unit — most use cases involve a specific unit (cubic feet for HVAC, cubic meters for shipping containers, litres for tanks), and forcing one would just require an extra conversion.
How is cone volume one-third the cylinder?
Direct consequence of calculus. Integrate the area of a circular cross-section that shrinks linearly with height: ∫₀ʰ π(r·(1−z/h))² dz = π·r²·h/3. Same ratio holds for any pyramid relative to its bounding prism.
Does the torus formula need both radii?
Yes. R is the distance from the centre of the torus to the centre of the tube; r is the tube's own radius. A bagel-shaped torus has R > r; a doughnut-shaped (more circular cross-section) has R ≈ 2r. Set R = 0 and you don't get a sphere — you get an unphysical zero volume.
Does the calculator store my measurements?
No. Every computation runs in your browser.

About

Why these eight shapes

They cover ~95% of practical volume questions: boxes (storage, shipping, room dimensions), cylinders (tanks, pipes, columns), spheres (balls, planets, droplets), cones (funnels, decorative shapes), pyramids (architectural, geological), torus (donuts, magnetic-coil cross-sections), ellipsoids (planetary bodies, particle physics). Cuboids and cubes are common enough to deserve separate inputs.

Precision

Output uses IEEE 754 double precision throughout, with π evaluated to JavaScript's Math.PI (≈ 3.141592653589793). The widget rounds to 2-6 significant figures for display; the underlying value is full precision if you need it via the REST API.

Sources & references

Authoritative references verified by Buğra Sözeri.