Volume of a Pyramid
The volume of a pyramid is one-third times the base area times the height.
Formula
V = \frac{1}{3} \times B \times h
Definition
The volume of a pyramid with base area $B$ and perpendicular height $h$ is $V = (1/3)Bh$, regardless of the base polygon's shape (triangle, square, hexagon, and so on) and holding for oblique pyramids too, where $h$ is still the perpendicular distance from apex to base plane. As an integral, $$V = \int_0^h B(1-z/h)^2 \, dz = Bh\int_0^1 (1-t)^2 \, dt = \frac{Bh}{3},$$ since the cross-section at height $z$ is a scaled copy of the base with linear scale factor $(1-z/h)$ and area $B(1-z/h)^2$, and integrating a quadratic function yields the $1/3$ factor. A frustum (pyramid with the top cut off) with base area $B_1$, top area $B_2$, and height $h$ has $V = (h/3)(B_1 + B_2 + \sqrt{B_1 B_2})$, a formula derived in ancient Egypt (Moscow Mathematical Papyrus, ca. 1850 BCE), one of the earliest known volume calculations.
Example
A square pyramid with base $6$ cm $\times$ $6$ cm and height $4$ cm has $B = 36$ cm$^2$, $V = (1/3)(36)(4) = 48$ cm$^3$, and a triangular pyramid with triangular base area $10$ cm$^2$ and height $9$ cm has $V = (1/3)(10)(9) = 30$ cm$^3$. The Great Pyramid of Giza had original base $230.4$ m $\times$ $230.4$ m ($B = 53{,}084$ m$^2$) and height $146.5$ m, giving $V = (1/3)(53084)(146.5) = 2.59 \times 10^6$ m$^3$, about $2.59$ million cubic meters.
Key Insight
Three identical square pyramids can be assembled to form a cube, so each pyramid holds $1/3$ of the cube's volume, which is where the $1/3$ comes from; any prism can be cut into exactly $3$ congruent pyramids, the most satisfying explanation for the factor, and it works for any prism shape, not just rectangular ones. The Moscow Mathematical Papyrus gives the correct frustum formula without derivation, suggesting ancient Egyptians had an intuitive or empirical method; it was not rigorously proved until the era of calculus, $3500$ years later, testifying to the remarkable mathematical sophistication of ancient Egypt.