Pyramid Volume Calculator
A pyramid holds exactly one third of the volume of a prism with the same base and height. Choose your base shape, enter the dimensions, and get the volume plus a full surface-area and geometry breakdown instantly.
Formula
Worked example
For a square pyramid with side 6 cm and height 9 cm: base area = 6^2 = 36 cm^2. Apothem = 6/2 = 3 cm, so slant height = sqrt(81 + 9) = sqrt(90) = 9.49 cm. Lateral area = (1/2) x 24 x 9.49 = 113.84 cm^2. Total surface = 36 + 113.84 = 149.84 cm^2. Volume = (1/3) x 36 x 9 = 108 cm^3.
How the pyramid volume formula works
The volume of any pyramid is one third of the volume of a prism that shares its base and its height. For any base shape with area A, the formula is V = (1/3) x A x h, where h is the perpendicular height from the base centre to the apex. This one-third relationship is exact, not an approximation: it follows from integral calculus by summing infinitely thin cross-sections whose area shrinks linearly from the full base down to zero at the apex. Widening the base affects volume far more than raising the apex by the same amount, because the base dimensions multiply together while the height enters only once. This calculator supports four base shapes: square (all sides equal), rectangular (two pairs of sides), equilateral triangular, and regular hexagonal.
Surface area: lateral faces and slant height
Unlike the volume, which depends only on base area and height, the surface area requires knowing the slant height: the distance from the apex straight down to the midpoint of a base edge, measured along the sloping face. For a right pyramid with a regular base, slant height s = sqrt(h^2 + r^2) where r is the inradius (apothem) of the base polygon. The lateral face area equals half the base perimeter times the slant height: A_lateral = (1/2) x P x s. For a rectangular base the two pairs of triangular faces have different slant heights, so the calculator sums them separately. The total surface area is base area plus lateral area, which is the figure to use when estimating materials for constructing or coating the pyramid.
Lateral edge, base perimeter, and which height to use
The lateral edge is the sloping line from a corner of the base up to the apex; it is always longer than the slant height because it runs to a corner rather than to an edge midpoint. For a square pyramid with side a: lateral edge = sqrt(h^2 + a^2/2). The base perimeter is simply the number of sides times the side length for regular bases, or 2 x (length + width) for a rectangular base. Most importantly, the height used in every formula here is the perpendicular height: the straight vertical distance from the centre of the base to the apex. Do not use the slant height or the lateral edge in the volume formula. Those measures are always longer than the perpendicular height, and substituting them overstates the volume.
Unit conversions and real-world applications
Switch between metric (cm) and imperial (in) using the units selector; all outputs update together. To convert a cm^3 volume to litres, divide by 1,000. To convert to millilitres the figure is the same since 1 mL = 1 cm^3. For in^3, divide by 231 to get US gallons or by 1,728 to get cubic feet. Pyramid geometry appears in architecture (roofs, spires, monuments), packaging (pyramid tea bags, chocolate boxes), geology (volcanic cones approximated as cones or pyramids), and in engineering whenever a tapered solid needs to be sized for weight or fill.
Pyramid geometry examples (metric, square base unless noted)
| Shape | Side / Dim (cm) | Height (cm) | Base area (cm^2) | Volume (cm^3) | Slant ht (cm) |
|---|---|---|---|---|---|
| Square | 6 | 9 | 36.00 | 108.00 | 9.49 |
| Square | 4 | 6 | 16.00 | 32.00 | 6.32 |
| Square | 10 | 12 | 100.00 | 400.00 | 13.00 |
| Rectangular 10x8 | 10 x 8 | 12 | 80.00 | 320.00 | 12.37 |
| Triangular (equil.) | 6 | 8 | 15.59 | 41.57 | 8.16 |
| Hexagonal | 6 | 9 | 93.53 | 280.59 | 9.62 |
All heights are perpendicular. Volume = (1/3) x base area x height. Slant height = sqrt(h^2 + (a/2)^2) for square bases.
Frequently asked questions
Why is a pyramid exactly one third of a prism?
A pyramid and a prism (box or column) with the same base and the same height are related by exactly one third. Integral calculus shows this by summing the shrinking cross-sections of a pyramid from base to apex: the area of each slice at height z is proportional to (1 - z/h)^2, and integrating that from 0 to h yields 1/3 of the base area times the height. You can also picture three congruent pyramids that fit together perfectly to fill one triangular prism of the same base and height.
Do I use the slant height or the perpendicular height for volume?
Always use the perpendicular height for volume: the straight vertical distance from the centre of the base to the apex. The slant height runs along a sloping face and is always longer, so using it would overstate the volume. Slant height is needed for the lateral face area formula A = (1/2) x P x s, but never for the volume formula.
How do I convert the pyramid volume to litres or gallons?
If you entered centimetres, the volume is in cubic centimetres. Divide by 1,000 to get litres (since 1 L = 1,000 cm^3). If you entered inches, divide the in^3 result by 231 to get US gallons, or by 1,728 to get cubic feet. Make sure all dimensions are in the same unit before calculating.
What is the lateral face area and when do I need it?
The lateral face area is the combined area of all the sloping triangular faces, excluding the base. It equals half the base perimeter times the slant height: A_lateral = (1/2) x P x s. You need it whenever you are coating the outside faces of a pyramid with paint, tiles, metal sheeting, or another material, or estimating the surface-area-to-volume ratio for design purposes.
What is the lateral edge of a pyramid?
The lateral edge is the straight line from a corner of the base up to the apex. It is always longer than the slant height because it runs to a corner rather than to the midpoint of an edge. For a square pyramid with side a and perpendicular height h, the lateral edge length is sqrt(h^2 + a^2/2). It is useful when cutting physical panels or calculating the length of ridge poles in a pyramidal roof.
How does the formula change for a hexagonal pyramid?
For a regular hexagonal base with side length a, the base area is (3*sqrt(3)/2) x a^2. The inradius (apothem, distance from centre to midpoint of a side) is a*sqrt(3)/2, so the slant height is sqrt(h^2 + (a*sqrt(3)/2)^2). The lateral area is (1/2) x 6a x slant height, and the volume is the standard (1/3) x base area x h. The circumradius of a regular hexagon equals the side length a, so the lateral edge is simply sqrt(h^2 + a^2).