acalculator

What is the volume of my shape?

Pick a shape and enter its measurements to get its volume and the formula used.

Your numbers

Volume
240

Rectangular box volume: 240 cubic units.

Formula
V = l × w × h

Volume: 240. Rectangular box volume: 240 cubic units.

How to calculate

Finds the volume of a cube, box, cylinder, cone, sphere, hemisphere, pyramid, capsule, conical frustum, or ellipsoid from its dimensions.

Example with the default inputs (Shape Rectangular box, Length (l) 10, Width (w) 6, Height (h) 4): Rectangular box volume: 240 cubic units.

Method: V = the shape’s standard volume formula, for example V = πr²h for a cylinder and V = 4/3 πr³ for a sphere.

  • Every length is more than 0 and all are in the same unit; the volume is in that unit cubed.
  • Cones, pyramids, and frustums are right (the top is straight above the centre of the base).
  • A capsule is a cylinder of height h with a hemisphere of the same radius on each end.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Shape Rectangular box, Length (l) 10, Width (w) 6, Height (h) 4 gives Volume 240, Formula V = l × w × h.Source: hand calculation in content.mdx: 10 × 6 × 4 = 240
  2. Shape Cube, Side (s) 5 gives Volume 125.Source: hand calculation in content.mdx: 5³ = 125
  3. Shape Cylinder, Radius (r) 3, Height (h) 4 gives Volume 113.097336.Source: hand calculation in content.mdx: π × 9 × 4 = 36π; Python 3: math.pi * 3**2 * 4 = 113.09733552923255
  4. Shape Cone, Radius (r) 3, Height (h) 4 gives Volume 37.699112.Source: hand calculation in content.mdx: 36π ÷ 3 = 12π; Python 3: math.pi * 9 * 4 / 3 = 37.69911184307752
  5. Shape Sphere, Radius (r) 3 gives Volume 113.097336.Source: hand calculation in content.mdx: 4/3 × π × 27 = 36π; Python 3: 4/3 * math.pi * 3**3 = 113.09733552923254
  6. Shape Hemisphere, Radius (r) 3 gives Volume 56.548668.Source: hand calculation in content.mdx: half of 36π = 18π; Python 3: 4/3 * math.pi * 3**3 / 2 = 56.54866776461627
  7. Shape Rectangular pyramid, Length (l) 10, Width (w) 6, Height (h) 4 gives Volume 80.Source: hand calculation in content.mdx: 240 ÷ 3 = 80
  8. Shape Capsule, Radius (r) 3, Height (h) 4 gives Volume 226.194671.Source: hand calculation in content.mdx: 36π + 36π = 72π; Python 3: math.pi * 9 * 4 + 4/3 * math.pi * 27 = 226.19467105846508
  9. Shape Conical frustum, Radius (r) 3, Second radius (r₂) 2, Height (h) 4 gives Volume 79.587014.Source: hand calculation in content.mdx: π × 4 × (9 + 6 + 4) ÷ 3 = 76π/3; Python 3: math.pi * 4 * 19 / 3 = 79.58701389094142
  10. Shape Ellipsoid, Semi-axis a 3, Semi-axis b 2, Semi-axis c 1 gives Volume 25.132741.Source: hand calculation in content.mdx: 4/3 × π × 6 = 8π; Python 3: 4/3 * math.pi * 3 * 2 * 1 = 25.132741228718345

How it works

Pick a shape, then enter the lengths it needs. The calculator uses the standard volume formula for the shape (π = 3.14159265…):

  • Cube, side s: V = s³
  • Rectangular box, length l, width w, height h: V = l × w × h
  • Cylinder, radius r, height h: V = π × r² × h
  • Cone, radius r, height h: V = π × r² × h ÷ 3
  • Sphere, radius r: V = 4 ÷ 3 × π × r³
  • Hemisphere, radius r: V = 2 ÷ 3 × π × r³ (half a sphere)
  • Rectangular pyramid, base length l, base width w, height h: V = l × w × h ÷ 3
  • Capsule, radius r, length h of the straight part: V = π × r² × h + 4 ÷ 3 × π × r³
  • Conical frustum, end radii r and r₂, height h: V = π × h × (r² + r × r₂ + r₂²) ÷ 3
  • Ellipsoid, semi-axes a, b and c: V = 4 ÷ 3 × π × a × b × c

The page also shows the formula it used.

Assumptions

  • Every length is more than 0, and all lengths are in the same unit. The volume is in that unit cubed (cm gives cm³).
  • The height is measured at right angles to the base. Cones, pyramids and frustums are right: the tip, or the top, is straight above the centre of the base.
  • A capsule is a cylinder of radius r and height h with a hemisphere of radius r on each end, so its total length is h + 2r.
  • A semi-axis is half of the ellipsoid's full width in that direction. With a = b = c = r the ellipsoid is a sphere.

Worked examples by hand

Rectangular box 10 × 6 × 4. V = 10 × 6 × 4 = 240.

Cube with side 5. V = 5 × 5 × 5 = 125.

Cylinder, radius 3, height 4. V = π × 3² × 4 = 36π = 113.097336.

Cone, radius 3, height 4. V = 36π ÷ 3 = 12π = 37.699112.

Sphere, radius 3. V = 4 ÷ 3 × π × 27 = 36π = 113.097336.

Hemisphere, radius 3. Half the sphere: 18π = 56.548668.

Rectangular pyramid, base 10 × 6, height 4. V = 10 × 6 × 4 ÷ 3 = 80.

Capsule, radius 3, straight part 4. The cylinder is 36π and the two hemispheres make one sphere of 36π, so V = 72π = 226.194671.

Conical frustum, radii 3 and 2, height 4. V = π × 4 × (9 + 6 + 4) ÷ 3 = 76π ÷ 3 = 79.587014.

Ellipsoid, semi-axes 3, 2 and 1. V = 4 ÷ 3 × π × 6 = 8π = 25.132741.

Other questions people ask

How do I calculate volume?

Use the formula for the shape. For a box, multiply length × width × height: a 10 × 6 × 4 box holds 240 cubic units. For shapes with a constant cross-section, such as a cylinder, multiply the area of the base by the height: πr² × h.

What units is the volume in?

The cube of the unit you measured in. Measure in centimeters and the volume is in cubic centimeters (cm³); measure in feet and it is in cubic feet (ft³). Use the same unit for every length. 1,000 cm³ is 1 liter, and 1 ft³ is about 7.48 US gallons.

How do I find the volume of a cylinder?

Multiply π by the radius squared and by the height: V = πr²h. A cylinder with radius 3 and height 4 has a volume of π × 9 × 4 = 36π, about 113.1. If you know the diameter, halve it to get the radius first.

Why is a cone one third of a cylinder?

A cone with the same base and height as a cylinder holds exactly one third as much: V = πr²h ÷ 3. The same is true for any pyramid and the prism with its base and height. The volume formula comes from adding up thin circular slices that shrink from the base to the tip.

How do I find the volume of a sphere?

Use V = 4/3 × π × r³. A sphere with radius 3 has a volume of 4/3 × π × 27 = 36π, about 113.1. A hemisphere is half of that.

What is a conical frustum?

A cone with its tip cut off by a cut parallel to the base, like a bucket or a lampshade. With end radii r and r₂ and height h, V = πh(r² + r × r₂ + r₂²) ÷ 3.