An n-sided pyramid is a polyhedron formed by connecting an n-sided polygonal base and a point, called the apex, by n triangular faces (n ≥ 3). When unspecified, the base is typically assumed to be square. For a triangular pyramid each face can serve as base, with the opposite vertex as apex.
The volume of a pyramid is
where A is the area of the base and h the height from the base to the apex. This works for any location of the apex, provided that h is measured as the perpendicular distance from the plane which contains the base.