acalculator

What is the pyramid volume?

Pick the shape of the base, type its size and the pyramid’s height. The pyramid volume calculator finds the base area and the volume, one third of a prism with the same base and height.

Your numbers

Volume
48

A pyramid with a base area of 36 and a height of 4 has a volume of 48.

Base area
36
Prism with the same base and height
144

Volume: 48. A pyramid with a base area of 36 and a height of 4 has a volume of 48.

How to calculate

Finds the volume of a pyramid with a square, rectangular, triangular or regular-polygon base, or a known base area, from V = ⅓ × base area × height.

Example with the default inputs (Base shape Square, Base side (s) 6, Height (h) 4): A pyramid with a base area of 36 and a height of 4 has a volume of 48.

Method: V = ⅓ × B × h. B = s² (square), l × w (rectangle), ½ × b × t (triangle), n s² ÷ (4 tan(π ÷ n)) (regular n-gon), or the typed base area.

  • The height is measured at a right angle to the base, so the formula holds for right and oblique pyramids alike.
  • Lengths are in any one unit; the base area is in that unit squared and the volume in that unit cubed.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Base shape Square, Base side (s) 6, Height (h) 4 gives Volume 48, Base area 36, Prism with the same base and height 144.Source: OpenStax, Calculus Volume 1, §6.2 Determining Volumes by Slicing (Example 6.6: a pyramid with a square base of side a and height h has V = ⅓a²h), https://openstax.org/books/calculus-volume-1/pages/6-2-determining-volumes-by-slicing (retrieved 2026-10-05)
  2. Base shape Rectangle, Base length (l) 4, Base width (w) 3, Height (h) 5 gives Volume 20, Base area 12.Source: OpenStax, Calculus Volume 1, §6.2 Determining Volumes by Slicing (Example 6.6: a pyramid with a square base of side a and height h has V = ⅓a²h), https://openstax.org/books/calculus-volume-1/pages/6-2-determining-volumes-by-slicing (retrieved 2026-10-05)
  3. Base shape Triangle, Triangle base 6, Triangle height 4, Height (h) 10 gives Volume 40, Base area 12.Source: OpenStax, Calculus Volume 1, §6.2 Determining Volumes by Slicing (Example 6.6: a pyramid with a square base of side a and height h has V = ⅓a²h), https://openstax.org/books/calculus-volume-1/pages/6-2-determining-volumes-by-slicing (retrieved 2026-10-05)
  4. Base shape Regular polygon, Number of sides (n) 6, Base side (s) 2, Height (h) 3 gives Base area 10.392305, Volume 10.392305.Source: OpenStax, Contemporary Mathematics, §10.6 Area (a regular polygon’s area is ½ × apothem × perimeter), https://openstax.org/books/contemporary-mathematics/pages/10-6-area (retrieved 2026-10-05); OpenStax, Calculus Volume 1, §6.2 Determining Volumes by Slicing (Example 6.6: a pyramid with a square base of side a and height h has V = ⅓a²h), https://openstax.org/books/calculus-volume-1/pages/6-2-determining-volumes-by-slicing (retrieved 2026-10-05)
  5. Base shape Known base area, Base area (B) 0.1, Height (h) 0.3 gives Volume 0.01, Prism with the same base and height 0.03.

How it works

V = ⅓ × B × h, where B is the base area and h the perpendicular height. The base area:

BaseB
Square with side ss²
Rectangle l by wl × w
Triangle with side b and height t on it½ × b × t
Regular polygon with n sides of length sn s² ÷ (4 tan(π ÷ n)), which is ½ × apothem × perimeter with apothem s ÷ (2 tan(π ÷ n))
Known base areathe typed B

The page also shows B × h, the volume of a prism with the same base and height; the pyramid is one third of it.

Rules

  • Lengths and the height are from 10⁻¹² to 10¹²; a typed base area is from 10⁻¹² to 10²⁴. The regular polygon has 3 to 1,000 sides.
  • Use one length unit throughout; the area is in that unit squared and the volume in that unit cubed.

Output format. For every base except the regular polygon, typed decimals are read exactly and the volume is the exact value, rounded once to 10 significant figures (⅓ × 0.1 × 0.3 is exactly 0.01). The regular polygon base uses double-precision tan and π.

Worked examples by hand

Square base, side 6, height 4. B = 36, B × h = 144, V = 144 ÷ 3 = 48.

Rectangle 4 by 3, height 5. B = 12, V = 12 × 5 ÷ 3 = 20.

Triangle base 6 with height 4, pyramid height 10. B = ½ × 6 × 4 = 12, V = 12 × 10 ÷ 3 = 40.

Regular hexagon, side 2, height 3. B = 6 × 4 ÷ (4 tan 30°) = 6 ÷ (1/√3) = 6√3 = 10.3923, V = 6√3 × 3 ÷ 3 = 10.3923.

Base area 0.1, height 0.3. B × h = 0.03, V = 0.01.

Other questions people ask

What is the formula for the volume of a pyramid?

V = ⅓ × B × h, where B is the area of the base and h the height from the apex straight down to the base. A square pyramid with 6 cm sides and a height of 4 cm holds ⅓ × 36 × 4 = 48 cm³.

How do I find the volume of a rectangular pyramid?

Multiply the length, the width and the height, then divide by 3: V = l × w × h ÷ 3. A 4 by 3 base with a height of 5 gives 60 ÷ 3 = 20.

How do I find the volume of a triangular pyramid?

Find the triangle’s area first, B = ½ × base × its height, then V = ⅓ × B × h. A triangle with base 6 and height 4 has B = 12; with a pyramid height of 10, V = 40.

Why is a pyramid one third of a prism?

Slice the pyramid parallel to its base. A slice at distance x from the apex has area B × (x ÷ h)², and adding the slices gives ∫₀ʰ B(x ÷ h)² dx = ⅓Bh. A prism with the same base and height holds Bh.

Does the formula work for a slanted (oblique) pyramid?

Yes, as long as h is the perpendicular height (from the apex straight down to the plane of the base), not the slant height along a face.

How do I find the base area of a regular polygon pyramid?

For n sides of length s, B = n s² ÷ (4 tan(180° ÷ n)). A hexagonal base with 2 cm sides has B = 6√3 ≈ 10.392 cm².