About the pyramid volume calculator
A pyramid is a solid with a polygonal base and triangular faces that meet at a single apex. This calculator handles the two most common cases: a square pyramid (where length equals width) and a rectangular pyramid (where they differ). Enter the base length, base width, and the perpendicular height from the base to the apex, and it returns the enclosed volume plus a full surface-area breakdown.
The defining fact about every pyramid is the factor of one-third. A pyramid occupies exactly one-third of the prism (box) that shares its base and height. The same one-third relationship links a cone to its enclosing cylinder. This is not a coincidence: it falls out of integrating the cross-sectional area, which shrinks quadratically from base to apex. Ancient builders knew the rule empirically; the Egyptians sized stone for the Great Pyramid of Giza (roughly 230 m base, 139 m original height) at about 2.6 million cubic metres, which the one-third formula reproduces closely.
The tool also reports lateral surface area (the four sloping triangular faces) and total surface area (lateral plus base). Those require the slant heights, which depend on both the vertical height and how far the apex sits above the centre of each edge. Right pyramids, where the apex is directly above the base centre, are assumed throughout.
How it works: the formula
Volume uses the base area times the height, scaled by one-third. Surface area sums the base and the sloping faces, each of which is a triangle whose own height is the pyramid's slant height.
Volume V = (1/3) x L x W x H Base area A = L x W Slant height 1 s1 = sqrt( H^2 + (W/2)^2 ) (along the length edges) Slant height 2 s2 = sqrt( H^2 + (L/2)^2 ) (along the width edges) Lateral SA = L x s1 + W x s2 Total SA = Lateral SA + A
- L, W are the base length and width in any single unit (metres, feet, cm). Output volume is that unit cubed.
- H is the perpendicular (vertical) height from base to apex, not the slant edge.
- Slant heights use the half-base as one leg of a right triangle and H as the other. A rectangular base has two distinct slant heights.
- For a square pyramid, L = W, so s1 = s2 and lateral SA simplifies to 2 x L x s1.
Worked example
Take a square pyramid with a base of 10 by 10 units and a perpendicular height of 12 units (the calculator's defaults).
- Base area: A = 10 x 10 = 100 square units.
- Volume: V = (1/3) x 100 x 12 = 400 cubic units.
- Slant height: s = sqrt(12^2 + 5^2) = sqrt(144 + 25) = sqrt(169) = 13 units.
- Lateral SA: four faces, each a triangle of base 10 and height 13, area 65 each, so 4 x 65 = 260 square units.
- Total SA: 260 + 100 = 360 square units.
Reference table: common square pyramids
Volume for a square base of side L and perpendicular height H, computed as (1/3) x L^2 x H.
| Base side L | Height H | Base area | Volume |
|---|---|---|---|
| 5 | 6 | 25 | 50 |
| 10 | 12 | 100 | 400 |
| 10 | 20 | 100 | 666.7 |
| 15 | 15 | 225 | 1,125 |
| 20 | 30 | 400 | 4,000 |
| 100 | 100 | 10,000 | 333,333 |
Common pitfalls
- Using slant height instead of vertical height. The volume formula needs the perpendicular height H from base to apex. If you measured the edge length down a face, that is the slant height and will overstate H. Convert with H = sqrt(slant^2 - (half-base)^2).
- Mixing units. Length, width, and height must share one unit. Feeding centimetres for the base and metres for the height inflates the answer by a factor of a million.
- Forgetting the one-third. A frequent error is computing L x W x H and reporting that as volume. That is the enclosing box; the pyramid is one-third of it.
- Assuming an oblique pyramid behaves differently for volume. Volume depends only on base area and perpendicular height, so an oblique (tilted-apex) pyramid has the same volume as the right one. Surface area, however, changes, and this tool's slant-height math assumes a right pyramid.
- Confusing a pyramid with a frustum. If the top is cut off flat, you have a frustum, not a full pyramid, and need the frustum formula instead.
Frequently asked questions
Why is a pyramid's volume one-third of the box around it?
Because the cross-section parallel to the base shrinks as you climb toward the apex, scaling with the square of the remaining height fraction. Integrating that shrinking area from base to tip yields exactly one-third of base-area times height. Three identical pyramids can be assembled to fill a cube of the same base and height, which is the classic geometric proof.
What is the difference between height and slant height?
Height (H) is the vertical distance straight down from the apex to the base plane. Slant height is measured along the surface of a triangular face, from the apex down to the midpoint of a base edge. Volume uses H; surface area uses the slant height. They are related by the Pythagorean theorem with the half-base length as the third side.
Can this calculator handle a rectangular (non-square) pyramid?
Yes. Enter different values for base length and base width. The volume formula (one-third times length times width times height) works for any rectangular base. A rectangular base produces two different slant heights, one for the pair of faces over the length and one for the pair over the width, and the calculator reports both.
Does an oblique pyramid have the same volume as a right pyramid?
Yes, as long as the base area and perpendicular height are the same. Cavalieri's principle says that shearing the apex sideways does not change the volume, because every horizontal cross-section keeps the same area. The surface area does change, so this tool's surface-area output assumes a right pyramid with the apex centred over the base.
What units does the result use?
Whatever single unit you enter for length, width, and height. If you type metres, volume comes out in cubic metres and surface area in square metres. The numbers are unitless internally, so the tool simply assumes all three inputs share one consistent unit and reports cubed and squared versions of it.
