StatGardenREF. DESK
Calculators/Geometry/Pyramid
Geometry

Pyramid calculator

Volume and surface area of a rectangular-based pyramid.

What this calculator does

A pyramid with a rectangular base tapers from that base up to a single apex directly above its centre, and like a cone, its volume is exactly one third of the prism sharing the same base and height: the same result, just with a rectangular rather than circular footprint.

Because the base is rectangular rather than square in general, a pyramid usually has two different slant heights, one for each pair of triangular faces, rather than the single slant height a cone has. Confusing the two, or using one where the other is needed, is the most common error in estimating roofing or cladding.

The formula

FormulaV = ⅓·l·w·h; slant heights = √(h² + (w/2)²) and √(h² + (l/2)²)

Each pair of opposite triangular faces has its own slant height, found from the height and half of the base dimension that face spans: a right triangle in each case. Lateral surface area sums the areas of all four triangular faces using those two slant heights; total surface area adds the rectangular base on top.

TermMeaning
l, wThe length and width of the rectangular base.
hThe vertical height, base centre to apex.
Slant heightsThe two different sloped heights of the triangular faces, one for each pair.
Lateral edgeThe line from a base corner to the apex: different again from either slant height.

The inputs explained

FieldWhat to enter
Base lengthThe length of the rectangular base.
Base widthThe width of the rectangular base. Equal to l for a square base.
HeightThe vertical height from the centre of the base to the apex.

When to use it

Volume of a pyramid-shaped structure or stockpile

A pile of loose material that has settled into a pyramid shape, or a pyramidal roof or monument, has its volume from base length, width and height, divided by three.

Roofing material for a hip or pyramid roof

The two lateral surface figures correspond to the two pairs of roof faces on a rectangular hip roof, giving the tiling or sheeting area for each pair separately.

Comparing to the box the pyramid fits inside

A pyramid with the same base and height as a box holds exactly a third of its volume: a fixed ratio worth checking against the prism calculator as a sanity check.

A square-based pyramid as a special case

Setting length and width equal gives a square base, the shape of the Egyptian pyramids and most tent and awning designs, and the two slant heights come out equal as a result.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How volume and slant heights change with height, base fixed at 10 by 10

A square base held constant while the apex rises.

Square base 10 × 10
HeightVolumeSlant heightsLateral edge
4133.3336.403 and 6.4038.124
8266.6679.434 and 9.43410.677
12400.00013.000 and 13.00013.928
16533.33316.763 and 16.76317.493
24800.00024.515 and 24.51525.020
With a square base both slant heights are always equal: here 13 and 13 at a height of 12, since each is the hypotenuse of a right triangle with legs 12 and 5 (half of 10). That 5-12-13 triple is exact, the same relationship that appears in the cone calculator.

How volume changes as the base lengthens, width and height fixed

One base dimension fixed while the other stretches, turning the square base into an increasingly elongated rectangle.

Width 10, height 12
Base lengthVolumeSlant heightsTotal surface area
5200.00013.000 and 12.258237.577
10400.00013.000 and 13.000360.000
15600.00013.000 and 14.151486.510
20800.00013.000 and 15.620616.205
301,200.0013.000 and 19.209882.094
At l = 10 the base is square and both slant heights match at 13. As l stretches to 30, one slant height climbs to 19.21 while the other stays fixed at 13, because it depends only on the unchanged width and height.

Questions

Why does a pyramid have two slant heights?

Because a rectangular base has two different pairs of opposite sides, of different lengths in general, and each pair of triangular faces slopes at its own angle. Only a square-based pyramid has matching slant heights on both.

How do I find the volume of a pyramid?

Multiply the base area, length times width, by the height, then divide by three: the same one-third factor that applies to a cone relative to its enclosing cylinder.

What is the difference between slant height and lateral edge?

Slant height runs from the apex to the middle of a base edge, perpendicular to that edge. The lateral edge runs from the apex to an actual corner of the base, and is always the longer of the two.

Does this work for a pyramid with a square base?

Yes: set the length and width equal. Both slant heights will come out identical, as they should for a square base, and the shape matches the classic Egyptian pyramid proportions.

How is a pyramid’s volume related to the box around it?

A rectangular-based pyramid always holds exactly one third of the volume of the box sharing its base and height: the same one-third relationship a cone has with its enclosing cylinder.

For the circular-based equivalent, see the cone calculator. For the box a pyramid tapers from, use the rectangular prism calculator.