# What is the pyramid volume?

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.

- Page: https://www.acalculator.org/math/pyramid-volume-calculator
- JSON spec: https://www.acalculator.org/math/pyramid-volume-calculator.json
- Version: 1974d7659446

## Default answer

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.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| base | Base shape | The shape of the pyramid’s base. |
| s | Base side (s) | The length of one side of the square or regular polygon base. |
| n | Number of sides (n) | How many sides the regular polygon base has: 5 for a pentagon, 6 for a hexagon. |
| l | Base length (l) | The length of the rectangular base. |
| w | Base width (w) | The width of the rectangular base. |
| tb | Triangle base | One side of the triangular base. |
| th | Triangle height | The height of the triangular base, at a right angle to that side. |
| ba | Base area (B) | The area of the base, in the length unit squared. |
| h | Height (h) | The distance from the apex straight down to the plane of the base. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| volume | Volume | The space inside the pyramid, in the length unit cubed. |
| baseArea | Base area | The area of the base, in the length unit squared. |
| prism | Prism with the same base and height | Base area × height: the pyramid is one third of it. |

## 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.

## Assumptions

- 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.

## Worked examples

1. base = square, s = 6, h = 4 gives volume = 48, baseArea = 36, prism = 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 = rect, l = 4, w = 3, h = 5 gives volume = 20, baseArea = 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 = tri, tb = 6, th = 4, h = 10 gives volume = 40, baseArea = 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 = poly, n = 6, s = 2, h = 3 gives baseArea = 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 = area, ba = 0.1, h = 0.3 gives volume = 0.01, prism = 0.03.

## FAQ

### 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².

## Sources

- OpenStax, Calculus Volume 1, §6.2 Determining Volumes by Slicing (Example 6.6: the volume of a pyramid with a square base, V = ⅓a²h), CC BY-NC-SA 4.0. https://openstax.org/books/calculus-volume-1/pages/6-2-determining-volumes-by-slicing (retrieved 2026-10-05)
- OpenStax, Contemporary Mathematics, §10.6 Area (the area of a regular polygon, ½ × apothem × perimeter), CC BY 4.0. https://openstax.org/books/contemporary-mathematics/pages/10-6-area (retrieved 2026-10-05)
