What is a regular pyramid?
A regular pyramid (a right regular n-gonal pyramid) is a solid whose base is a regular polygon with n equal sides of length a and whose apex lies directly above the centre of that base, at height h. Its n lateral faces are congruent isosceles triangles. With n = 3 it is a triangular pyramid, with n = 4 a square pyramid, with n = 6 a hexagonal pyramid; as n grows the solid approaches a cone.
This calculator finds every standard measure of the pyramid from any sufficient pair of known values: the base edge with the height, slant height, lateral edge, volume, total surface area or face angle, or the height with the slant height.
How to use it
Choose what you know in What do you know?, enter the number of base sides n (3 to 1000) and the two known values. The length unit is a label only: the result shows lengths in that unit, areas in its square and the volume in its cube. Angles can be entered and shown in degrees or radians. The page shows results rounded to at most 6 decimal places, and writes very large and very small values out in full.
Formulas
Base inradius (apothem) and circumradius of the regular n-gon:
$$r = \frac{a}{2\tan(\pi/n)}, \qquad R = \frac{a}{2\sin(\pi/n)}$$Base area, slant height (apex to the midpoint of a base edge) and lateral edge, both by Pythagoras in the right triangles through the axis:
$$B = \frac{n\,a\,r}{2}, \qquad s = \sqrt{h^2 + r^2}, \qquad e = \sqrt{h^2 + R^2}$$Lateral area (n triangles of base a and height s), total surface area and volume (one third of base times height, by Cavalieri's principle):
$$L = \frac{n\,a\,s}{2}, \qquad S = B + L, \qquad V = \frac{B\,h}{3}$$The angle between a lateral face and the base is \(\arctan(h/r)\); the angle between a lateral edge and the base is \(\arctan(h/R)\).
Derivation
Join the apex to the centre of the base and to the n base corners: the base splits into n congruent isosceles triangles of base a and height r, so \(B = n \cdot a r / 2\). A pyramid has one third of the volume of the prism with the same base and height: three pyramids of equal volume fill a triangular prism, and by Cavalieri's principle every pyramid with base area B and height h has the same volume, because its cross-sections at each level have the same area \(B (1 - z/h)^2\). Integrating these cross-sections:
$$V = \int_0^h B\left(1 - \frac{z}{h}\right)^2 dz = \frac{B\,h}{3}$$The slant height is the hypotenuse of the right triangle formed by the height and the apothem r, which gives \(s = \sqrt{h^2 + r^2}\).
Solving from other known values
When the height is not given, it is found first: from the slant height \(h = \sqrt{s^2 - r^2}\), from the lateral edge \(h = \sqrt{e^2 - R^2}\), from the volume \(h = 3V/B\), from the total surface area \(s = 2(S - B)/(n a)\) and then \(h = \sqrt{s^2 - r^2}\), and from the face angle \(h = r \tan\alpha\). From the height and slant height, \(r = \sqrt{s^2 - h^2}\) and \(a = 2 r \tan(\pi/n)\). A pair that cannot belong to a pyramid is refused with the reason: a slant height not longer than r, a lateral edge not longer than R, a total area not more than twice the base area, or a face angle of 90 degrees or more.
Worked example
The default is a regular pentagonal pyramid with base edge a = 4 and height h = 7. The base inradius is \(r = 4 / (2\tan 36^\circ) \approx 2.752764\), so the base area is \(B = 5 \cdot 4 \cdot 2.752764 / 2 \approx 27.527638\) and the volume is \(V = 27.527638 \cdot 7 / 3 \approx 64.231156\). The slant height is \(\sqrt{49 + 7.577709} \approx 7.521816\), the lateral area \(5 \cdot 4 \cdot 7.521816 / 2 \approx 75.218155\) and the total surface area about 102.745794.
FAQ
Is the slant height the same as the lateral edge?
No. The slant height runs from the apex to the middle of a base edge and is the height of each lateral triangle; the lateral edge runs from the apex to a base corner and is always longer.
What happens when n is very large?
The base becomes almost a circle of radius r and the pyramid almost a cone: with n = 1000 the volume differs from \(\pi r^2 h / 3\) by less than one part in a hundred thousand.
Does the unit change the numbers?
No. Geometry does not depend on the unit, so the unit only labels the results.
How accurate are the results?
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable.
Accuracy and input range
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable.
Enter each length from 0.000001 to 1,000,000,000, each area from 0.000000000001 to 1,000,000,000,000,000,000 and each volume from 0.000000000000000001 to 1,000,000,000,000,000,000,000,000,000. Anything outside is refused with a message naming the range.
References
D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulae, 33rd ed., 2018
J. W. Harris and H. Stocker, Handbook of Mathematics and Computational Science, 1998