If a rectangular loaf of bread was cut into slices, the shape and size of each slice would be the same. The loaf is a prism.

A prism has a cross-section which is the same throughout the shape.

A triangular prism has a triangular cross-section.

To calculate the volume of a prism, first calculate the area of the cross-section.

Dimensions of a triangular prism

\frac{1}{2} \times 2 \times 5 = 5~\text{cm}^2

Multiply the area of the cross-section by the length.

5 \times 4 = 20~\text{cm}^3

\text{Volume of a prism} = \text{area of the cross-section} \times \text{length}