Square Pyramid Volume: Formula, Examples, and a Free Calculator
ByMuhammad Ali•Founder of KruskalCode
07:38
6 min read

Finding the volume of a square-based pyramid is a common geometry task in both US and UK classrooms. The rule is easy to remember once you link it to prisms: a pyramid with the same base and height fills exactly one third of the matching prism. Use the free Pyramid Volume Calculator (linked just below) for square, rectangular, triangular and polygon bases — including slant-height input — then come back here for the worked explanation.
Use the free calculator
Skip the longhand math — open the matching ProMathTools calculator and get an instant result.
Use the calculator →Explanation
Start with the area of the square base, A = s². The volume is one third of what you would get if you stretched that base through the full height of a prism: V = (1/3) × A × h. The height h must be measured straight up from the base to the apex, not along a slanted edge on a side face. If you mix centimetres and metres, convert first so every length uses the same unit; the volume then appears in the matching cubic unit.
Formula
V = (1/3) × s² × h, where s is the base side and h is the perpendicular height. Equivalently, V = (1/3) × (base area) × h.
Example
Take s = 3 cm and h = 12 cm. The base area is 9 cm². Multiply by the height to get 108 cm³ for a prism match, then take one third: V = 36 cm³. You can picture three identical pyramids filling the same box as one prism with the same base and height.
How to use the related calculator
Open the Pyramid Volume Calculator, pick your base shape (square, rectangular, triangular, regular polygon, or known base area), enter the dimensions in one length unit, then Calculate. For a square base you can tick “I know the slant height” instead of entering vertical h. Read base area, volume in several cubic units, and the step-by-step working. If you see an error, check positives and that slant height exceeds a/2.
Try the related calculator
Open toolFAQ
Why is there a factor of one third?
A pyramid with a flat base and apex directly above shares the same cross-section scaling as other pyramids; the calculus or Cavalieri argument used in many courses shows its volume is exactly one third of a prism with identical base and height.
Does this work for a rectangular (non-square) base?
The same volume rule applies: V = (1/3) × (length × width) × h. The Pyramid Volume Calculator supports rectangular bases directly — choose Rectangular and enter length, width and height.
Can I check answers in feet or metres?
Yes. Pick one length unit for s and h; the tool reports volume in the matching cubic unit. For rough sense, remember 1 m³ is 1000 litres; do not use that for formal exam working unless the question asks.
Related articles

About the author
Muhammad Ali. Muhammad Ali is a full-stack developer and founder of KruskalCode. He builds SaaS platforms and automation systems with React and Laravel, and helps teams ship fast, scalable tools.
Need a custom calculator, dashboard, or automation workflow? Reach out to KruskalCode.