The formula for calculating the volume of a triangular prism is: V = 1/2 x b x h x l, where b is the base length, h is the height of the triangle and l is the length of the prism.