Pyramid and Prism Volumes

By dan • June 2, 2026 • 3 min read

# Pyramid and Prism Volumes

## Plain English first

**Prism:** Any shape with a uniform cross-section from bottom to top. Take the area of that cross-section, multiply by the height. That's the volume — just stacking identical layers.

**Pyramid:** A shape that tapers from a base to a point. Three pyramids with the same base and height always fill one prism. So the volume is always ⅓ × (base area) × height. Same ⅓ logic as cones.

The connection: cones are circular pyramids. Cylinders are circular prisms. The ⅓ relationship holds for any pyramid/prism pair, regardless of the shape of the base.

---

## Standard math notation

```
Right Prism:
V = B × h
where B = area of the base (any shape)
h = height

Total surface area:
T = 2B + P × h
where P = perimeter of the base

Pyramid:
V = ⅓ × B × h
where B = area of the base
h = perpendicular height to apex

Total surface area:
T = B + ½ × P × ℓ
where ℓ = slant height (from base edge midpoint to apex)
```

---

## Verbose Python with descriptive names

```python
def compute_prism_volume(
area_of_base_cross_section,
height_of_prism
):
"""
A prism is a shape with a uniform cross-section extruded upward.
Volume = area of one cross-section × number of cross-section layers stacked.
Works for rectangular, triangular, hexagonal, or any prism.
"""
volume = area_of_base_cross_section * height_of_prism
return volume

def compute_pyramid_volume(
area_of_base,
perpendicular_height_to_apex
):
"""
Three pyramids with matching base and height fill one prism exactly.
So a pyramid is always one third of its surrounding prism.
Works for square pyramids, triangular pyramids (tetrahedra), any base.
"""
volume_of_matching_prism = area_of_base * perpendicular_height_to_apex
volume_of_pyramid = volume_of_matching_prism / 3
return volume_of_pyramid

def compute_prism_surface_area(
area_of_base,
perimeter_of_base,
height_of_prism
):
area_of_both_bases = 2 * area_of_base
area_of_side_walls = perimeter_of_base * height_of_prism
return area_of_both_bases + area_of_side_walls

def compute_pyramid_surface_area(
area_of_base,
perimeter_of_base,
slant_height_from_base_edge_to_apex
):
area_of_lateral_faces = 0.5 * perimeter_of_base * slant_height_from_base_edge_to_apex
return area_of_base + area_of_lateral_faces

# Triangular prism (cross-section is a right triangle: base=3, height=4)
triangle_area = 0.5 * 3 * 4 # = 6
prism_vol = compute_prism_volume(
area_of_base_cross_section=triangle_area,
height_of_prism=10
)
print(f"Triangular prism volume: {prism_vol}") # 60.0

# Square pyramid (base 4×4, height 6)
square_base_area = 4 * 4 # = 16
pyramid_vol = compute_pyramid_volume(
area_of_base=square_base_area,
perpendicular_height_to_apex=6
)
print(f"Square pyramid volume: {pyramid_vol}") # 32.0
```

---

## The ⅓ pattern across all tapering shapes

| Shape | Base | Formula |
|-------|------|---------|
| Rectangular prism | Rectangle | V = lwh |
| Triangular prism | Triangle | V = ½bh × depth |
| Cylinder | Circle | V = πr²h |
| Pyramid | Any polygon | V = ⅓Bh |
| Cone | Circle | V = ⅓πr²h |

Prisms and cylinders stack identical layers → full base × height. Pyramids and cones taper to a point → ⅓ of the surrounding prism/cylinder.

---

## Builds on
- [Cylinder Volume — A Circle Grown Tall](/articles/7f98e02b-50ce-41a4-828c-c2fb80b30d97)
- [Cone Volume — One Third of a Cylinder](/articles/306a7711-f573-481b-86a2-edfe3e7e55b7)
- [Rectangle Area — Counting the Grid](/articles/66820765-0ec9-4197-8cfa-55bb81c2bf6d)

## See also
- [Triangle Area — Half a Rectangle](/articles/6efb3a21-cfdd-4358-bc66-87ad756cb042)
- [Math Foundations — Visual Table of Contents](/articles/d404884f-54fc-4289-b3f1-baaad2bec6b2)