A square pyramid has a square base and four triangular faces that meet at a single point, the apex. Hip roofs over square gazebos, garden obelisks, skylights, tent tops and the pyramids of Giza all follow this shape. The calculator solves the whole solid from any of five pairs of measurements and shows each step, so you can see exactly how the height, slant height and lateral edge relate.
How to use the square pyramid calculator
- In I know the, choose Base edge and height, Base edge and slant height, Base edge and lateral edge, Base edge and volume (find the height) or Height and slant height.
- Enter the values shown. The Base edge (a) is one side of the square. The Height (h) drops straight from the apex to the center of the base, the Slant height (s) runs up the middle of a face, and the Lateral edge (e) runs from a base corner to the apex. The Volume (V) is in cubic units.
- Pick the Units (meters by default).
- Read the volume, or the height in volume mode. The list adds capacity in liters and US gallons, total surface area, lateral area (4 faces), base area, area of one face, slant height, lateral edge, base diagonal and the face-to-base angle.
Square pyramid formulas
Height, slant height and lateral edge
These three lengths are easy to mix up, and each one changes the answer. All three are linked by right triangles inside the pyramid:
| Length | Runs from apex to | Right triangle |
|---|---|---|
| Height h | center of the base | — |
| Slant height s | midpoint of a base edge | legs h and a/2 |
| Lateral edge e | a base corner | legs h and a/√2, or s and a/2 |
The order is always h < s < e. Measure a model with a 10 cm base and get 13 cm: as a slant height, the pyramid is 12 cm tall with a volume of 400 cm³; as a lateral edge, it is only 10.91 cm tall and holds 363.62 cm³, about 9% less. On a physical object the lateral edge is usually the easiest to measure, because it is a visible edge. In roof framing, the hips are lateral edges, while a rafter running up the center of a face matches the slant height.
Worked example: a pyramid roof on a square gazebo
A gazebo is 12 ft square at the eaves and its roof rises 4 ft to the peak. Choose Base edge and height, enter a = 12 and h = 4, and pick feet.
- Slant height: √(4² + 6²) = √52 ≈ 7.21 ft
- Lateral area, the four roof faces: 2 × 12 × 7.21 ≈ 173.07 ft², about 1.73 roofing squares of 100 ft² before overhang and waste
- Lateral edge: √(16 + 72) ≈ 9.38 ft, the line length of each hip from corner to peak
- Face-to-base angle: 33.69°, a rise of 4 over a run of 6, which roofers call an 8-in-12 pitch
- Air space under the roof: ⅓ × 144 × 4 = 192 ft³
The Great Pyramid as a check
The Great Pyramid of Giza had a base of about 230.4 m per side and an original height of about 146.6 m; the figures vary slightly between surveys, and the missing capstone has since lowered it. Entering those values gives a volume of roughly 2.59 million m³, a slant height of about 186.45 m and a face angle of 51.84°.
Egyptian builders set slopes with the seked, the horizontal run in palms for each cubit (7 palms) of rise, and the Rhind Mathematical Papyrus (about 1550 BC) includes seked problems. A seked of 5½ palms gives arctan(7 ÷ 5.5) ≈ 51.84°, matching the computed angle. The slant height divided by half the base, 186.45 ÷ 115.2, is about 1.618, close to the golden ratio; whether that was intended is still debated.
For a pyramid with its top cut off, use the pyramid frustum calculator. The Pythagorean theorem calculator handles any single right triangle from the table above.
Frequently asked questions
What is the volume of a square pyramid?
V = ⅓a²h, one third of the base area times the perpendicular height. A pyramid with a 6 m base edge and a 4 m height has a volume of ⅓ × 36 × 4 = 48 m³, exactly one third of a 6 × 6 × 4 m box.
What is the difference between slant height and lateral edge?
The slant height runs up the middle of a triangular face, from the midpoint of a base edge to the apex. The lateral edge runs from a base corner to the apex, so it is always longer. With a 10 cm base, a 13 cm slant height gives a volume of 400 cm³, while a 13 cm lateral edge gives only about 363.62 cm³.
How do I find the height of a pyramid from the slant height?
Use the right triangle formed by the height, half the base edge and the slant height: h = √(s² − (a/2)²). A 10 cm base with a 13 cm slant height gives h = √(169 − 25) = 12 cm.
How do I calculate the surface area of a square pyramid?
Add the base area a² to the four triangular faces, 2as, where s is the slant height. For a 6 m base and a 5 m slant height that is 36 + 60 = 96 m². Leave out a² when you only need the sloping faces, as with a roof.
Why is a pyramid's volume one third of a box?
A cube can be cut into three identical square pyramids that share one corner as their apex, each using one of the cube's faces as its base. Each piece is therefore one third of a³. Calculus, or Cavalieri's principle, extends the one-third rule to any pyramid or cone.