Geometry · 5 min read

How to Calculate Volume of 3D Shapes

Box, cylinder, and sphere — how much space is inside

Volume is the measure of space a solid occupies: how many unit cubes fit inside. This tutorial walks through V = ℓ w h for a rectangular box (the Volume calculator), V = π r² h for a cylinder, and V = ⁴⁄₃ π r³ for a sphere, a 4 × 3 × 2 worked example, and a playground that sketches the solid as you switch shapes.

Written by the My Calculator Stack editorial team. About our methods

These identities assume positive dimensions in one length unit; volume is then in that unit cubed. The Volume calculator on this site is the rectangular box V = ℓ w h. Cylinder and sphere identities match the Cylinder and Sphere calculator pages.

1.What volume is

Volume answers how much space a solid fills. Area is a face; volume stacks that face through a third dimension. A box multiplies three edge lengths. A cylinder uses the circular base area π r² times perpendicular height. A sphere is determined by radius alone. Surface area is a different quantity — square units on the outside, not cubic units inside.

2.The formulas

A rectangular prism (box) is length times width times height: V = ℓ w h. A right circular cylinder is base area times height: V = π r² h. A sphere is V = (4/3) π r³. Radius and height must be positive; r is the distance from the center to the surface, not the diameter.

\[ \begin{aligned}V_{\mathrm{box}} &= \ell w h \\V_{\mathrm{cyl}} &= \pi r^{2} h \\V_{\mathrm{sph}} &= \tfrac{4}{3}\pi r^{3}\end{aligned} \]

3.Worked example

Take ℓ = 4, w = 3, and h = 2 — the same defaults as the Volume calculator. Then V = 4 × 3 × 2 = 24 cubic units. A cylinder with r = 2 and h = 5 (the Cylinder calculator defaults) is π × 2² × 5 = 20π ≈ 62.832. A sphere with r = 3 (the Sphere calculator default) is (4/3) π × 27 = 36π ≈ 113.097.

\[ V=4\times 3\times 2=24 \]

4.Solid playground

Toggle box, cylinder, or sphere, then move the dimension sliders. The oblique sketch updates with the current edges or radius and the substituted volume. This is a teaching widget — no favorites, no full calculator chrome. Open the Volume calculator when you want the standalone box tool.

Inline playground

Volume V

24

V = 4 × 3 × 2 = 24

Oblique rectangular box with length, width, and height A rectangular prism whose volume is length times width times height.
The prism’s volume is V = ℓ w h. Labels show the current edges and volume.

Teaching aid only — dimensions must be positive and share one length unit. Extreme ratios may be drawn not to scale.

Open the full Volume calculator →

5.Open the full calculator

The Volume calculator uses V = ℓ w h and the same 4 × 3 × 2 example, with How it works, FAQ, and related geometry tools on one page. Browse the Sphere or Cylinder calculators if you need those solids next, or other geometry pages for area and surface.

Try it yourself

Open the related calculator and put these formulas to work.