The volume of a pyramid is one third of the product of its base area and height: V=31Bh. The base area is the area of the polygon opposite the apex, and the height is measured perpendicular to the base. By Cavalieri's principle, the volume is the same regardless of where the apex is located, so long as it is at the same height.