One Formula for Every Pyramid
Whatever shape the base is, a pyramid holds one-third of the prism that shares its base and height. Only the base area changes from one type to the next:
| Base shape | Base area | Volume |
|---|---|---|
| Square, side s | s² | s²h ÷ 3 |
| Rectangle, l by w | l × w | lwh ÷ 3 |
| Triangle, base b and height t | b × t ÷ 2 | (bt ÷ 2) × h ÷ 3 |
The one-third is not a rule of thumb. As you climb a pyramid, each horizontal slice shrinks in proportion to the square of the distance to the apex, and adding up those shrinking slices gives exactly one-third. The same argument explains the cone, and Why a Cone Is Exactly One-Third of a Cylinder walks through it with pyramids included.
Using the Calculator
Enter the base length, base width, and vertical height in one unit. For a square pyramid, type the same number for length and width. The results show the volume, base area, surface area, two slant heights, and the volume in liters, US gallons, imperial gallons, and cubic feet.
The calculator handles square and rectangular bases. For a triangular pyramid, work out the triangle's area by hand and use the formula directly, as in the examples below.
Vertical Height vs Slant Height
This is where most pyramid answers go wrong. The volume formula needs the vertical height: the straight drop from the apex to the center of the base. The slant height runs from the apex down the middle of a triangular face to the base edge. It is always longer, so using it inflates the volume.
The calculator derives both slant heights from your inputs using Pythagoras. Take a rectangular pyramid 18 in long, 10 in wide, and 15 in tall:
- Faces along the 18 in sides: slant = √(5² + 15²) ≈ 15.81 in
- Faces along the 10 in sides: slant = √(9² + 15²) ≈ 17.49 in
- Surface area = 180 + 18 × 15.81 + 10 × 17.49 ≈ 639.5 in²
If a problem gives you only the slant height, reverse it: vertical height = √(slant² − (half the base side)²). Slant heights are what you need for cutting the triangular faces out of card, sheet metal, or fabric. Volume never uses them.
Worked Examples
| Problem | Base area | × height ÷ 3 | Volume |
|---|---|---|---|
| Display stand, rectangular base 18 × 10 in, height 15 in | 180 in² | 180 × 15 ÷ 3 | 900 in³ |
| Square pyramid, base 12 cm, height 9 cm | 144 cm² | 144 × 9 ÷ 3 | 432 cm³ |
| Square pyramid, base 4 cm, height 9 cm | 16 cm² | 16 × 9 ÷ 3 | 48 cm³ |
| Rectangular pyramid, 9 × 8 in, height 6 in | 72 in² | 72 × 6 ÷ 3 | 144 in³ |
| Triangular pyramid, triangle base 8 m and height 5 m, pyramid height 6 m | 20 m² | 20 × 6 ÷ 3 | 40 m³ |
| Container, square base 0.9 m inside, height 1.2 m | 0.81 m² | 0.81 × 1.2 ÷ 3 | 0.324 m³ = 324 L |
The container row is filled all the way to the apex. Because a pyramid is widest at the bottom, filling it to half its height already holds seven-eighths of the full volume: the empty top half is a small pyramid with half the height and one-eighth the volume.
For a larger example, the Great Pyramid of Giza has a square base of about 230.4 m and a current height of about 138.8 m. That gives 230.4² × 138.8 ÷ 3 ≈ 2.46 million m³.
Finding a Missing Height or Base
Multiply the volume by 3 first, then divide. A pyramid of 240 cm³ on a 60 cm² base has h = 720 ÷ 60 = 12 cm. Forgetting the 3 here gives 4 cm, which is the height of a box, not a pyramid.
If the top of the pyramid has been cut off flat, the shape is a frustum and needs its own formula. The Frustum Volume Calculator handles that case.
Units
Volume comes out in the cube of whatever unit you entered: centimeters give cm³, feet give ft³. Keep all three measurements in the same unit. For capacity, 1,000 cm³ is 1 liter, 1 m³ is 1,000 liters, and 231 in³ is 1 US gallon.
How the Numbers Are Checked
When length and width differ, the calculator produces two distinct slant heights: sqrt((width/2)^2 + height^2) for the two length-direction faces and sqrt((length/2)^2 + height^2) for the two width-direction faces, each from its own Pythagorean calculation. They only match when the base is square. The surface area (base area plus length times its slant height plus width times its slant height) always runs both, so a rectangular base is never treated as square.
Frequently Asked Questions
How do you calculate the volume of a pyramid?
Use V = base area × height ÷ 3. Find the base area first (length × width for a rectangular base, s² for a square base), multiply by vertical height, then divide by 3.
Is pyramid height the same as slant height?
No. Vertical height is the straight perpendicular distance from the center of the base to the apex, that is what the volume formula requires. Slant height is the longer diagonal distance along a triangular face, and it appears in surface area calculations, not volume.
Why does the pyramid volume formula always divide by 3?
A pyramid is one-third of a prism with the same base and height, the same relationship as a cone to a cylinder. This holds regardless of base shape: rectangular, square, or triangular. The factor of 1/3 is always there. For a pyramid with its top cut off horizontally, the resulting shape is a frustum: a separate calculator handles that case.
References
- Pyramid (geometry), Wikipedia: types of pyramids, volume formula derivation, and relationship to prisms.
- Pyramid, Wolfram MathWorld: formal definition with square, rectangular, and triangular base variants.
- Pyramids, Math is Fun: visual guide to identifying pyramid types and applying the volume formula.