Volume Calculator

Calculate the volume of various 3D shapes using their mathematical formulas.

Cube / Rectangular Prism

Formula: V = l × w × h

    ┌─────────┐
   /│        /│
  / │       / │ h (height)
 ┌─────────┐  │
 │  │      │  │
 │  └──────│──┘
 │ /       │ / w (width)
 └─────────┘
   l (length)
  

Cylinder

Formula: V = π × r² × h

     ╭─────╮
     │     │ 
     │     │ h (height)
     │     │
     ╰─────╯
       └─┘
        r (radius)
  

Sphere

Formula: V = (4/3) × π × r³

The sphere volume formula calculates the space inside a perfect ball by using the radius cubed, multiplied by π and 4/3.

      ╭───╮
    ╱       ╲
   │    •────│ r (radius)
    ╲       ╱
      ╰───╯
  

Cone

Formula: V = (1/3) × π × r² × h

       ╱╲
      ╱  ╲
     ╱    ╲ h (height)
    ╱      ╲
   ╱________╲
      └──┘
       r (radius)
  

Pyramid (Square Base)

Formula: V = (1/3) × b² × h

       ╱╲
      ╱  ╲
     ╱    ╲ h (height)
    ╱      ╲
   ╱________╲
   └────────┘
   b (base edge)
  

Why each shape needs a different formula

All five volume formulas here are variations on "base area × height," adjusted for how the shape tapers. A rectangular prism has a constant cross-section, so volume is just length × width × height with no adjustment. A cone or pyramid comes to a point, so its volume is exactly one-third of the equivalent prism or cylinder with the same base and height — a relationship provable with calculus (integrating cross-sectional area along the height) but usable here as a fixed 1/3 multiplier.

Worked example: a cone

A cone with base radius 5 and height 12 has volume V = (1/3) × π × r² × h = (1/3) × π × 25 × 12 = (1/3) × 300π = 100π ≈ 314.159 cubic units. Compare that to a cylinder of the same radius and height: π × 25 × 12 = 300π ≈ 942.478 cubic units — exactly three times larger, confirming the 1/3 relationship between a cone and its enclosing cylinder.

Worked example: a sphere

A sphere with radius 6 has volume V = (4/3) × π × r³ = (4/3) × π × 216 = 288π ≈ 904.779 cubic units. Because volume scales with the cube of the radius, doubling a sphere's radius multiplies its volume by 2³ = 8, not by 2 — a detail that trips people up when scaling up container or tank designs.

A note on the pyramid formula

The pyramid calculator here assumes a square base, so V = (1/3) × b² × h, where b is the length of one base edge. This is a special case of the general pyramid formula V = (1/3) × base area × height — for a non-square base (rectangular, triangular, or otherwise), the base-area term would need to be computed separately before applying the same one-third rule.