The volume of a pyramid has a very simple formula. It is one third of the volume of a prism with the same base.
The volume of a prism is the area of the cross section multiplied by the length of the prism. This is the same as the area of the base multiplied by the height.
For a pyramid, the volume is the area of the base multiplied by the height divided by three.