The volume enclosed by a pyramid is one third of the base area times the perpendicular height. As a formula: Where:
b is the area of the base of the pyramid
h is its height. The height must be measured as the vertical distance from the apex down to the base.
Recall that a pyramid can have a base that is any polygon, although it is usually a square. To calculate the area of a polygon see:
Recall that an oblique pyramid is one that 'leans over' - where the apex is not over the base center point. Drag the apex left and right above to see this. It turns out that the volume formula works just the same for these. You must however use the perpendicular height in the formula. This is the vertical red line in the figure above.
To illustrate this, check 'Freeze height'. As you drag the apex left and right, watch the volume calculation and note that the volume never changes.
Recall that the volume of a prism is its base area times its height. If you compare this to the formula of the pyramid, you will see one is exactly a third of the other. This means that the volume of a pyramid is exactly one third the volume of the prism with the same base and height.
Such a prism is called the "circumscribed prism" of the pyramid - the smallest prism that can contain the pyramid. In the figure above, select "Show prism" to see this.
Both the cone and pyramid have the same way of calculating the volume - one third the area of the base times height. In fact you can think of a cone as a pyramid with an infinite number of faces.
In Pyramid definition you can see this by increasing the number of base sides to a large number and noting how it begins to look like a cone.