What is a triangular prism?
A triangular prism is a solid with two parallel, congruent triangular faces (the top and bottom) connected by three rectangular lateral faces. The triangle is defined by its side lengths a, b and c, and the prism is formed by extruding that triangle a distance h, the prism height (also called the length or depth). This calculator finds the volume and the various surface areas, and can also solve for the prism height when you know the volume or lateral area.
How to use it
Pick a calculation mode from the dropdown, then enter the values it asks for. The default mode computes the volume from the three triangle sides and the prism height. Other modes return the total surface area (with a breakdown of lateral, top and bottom areas), the lateral area, the top or bottom triangle area, or solve for the prism height. Choose a length unit purely for labelling (no conversion is applied, so all inputs must share one unit), and set how many significant figures to round the answer to.
The formulas explained
The triangle area uses Heron's formula. First find the semi-perimeter \(s = (a + b + c) / 2\), then the area \(A = \sqrt{s(s-a)(s-b)(s-c)}\). Both the top and bottom faces equal this area. The volume is simply this area multiplied by the prism height: \(V = A \cdot h\). Each rectangular side face has area equal to a side length times h, so the lateral surface area is \(A_l = h(a + b + c)\). The total surface area adds the two triangular ends:
$$SA = h(a + b + c) + 2A.$$The sides must satisfy the triangle inequality, otherwise no valid triangle exists.
Worked example
Take \(a = 3\), \(b = 4\), \(c = 5\) and \(h = 10\). The semi-perimeter is \(s = 12/2 = 6\), so
$$A = \sqrt{6 \cdot 3 \cdot 2 \cdot 1} = \sqrt{36} = 6.$$The volume is
$$V = 6 \cdot 10 = 60 \text{ cubic units}.$$The lateral area is
$$A_l = 10 \cdot (3 + 4 + 5) = 120 \text{ square units},$$and the total surface area is
$$SA = 120 + 2 \cdot 6 = 132 \text{ square units}.$$FAQ
Is h the triangle's height? No. Here h is the prism's length/depth (the extrusion distance). The triangle's own perpendicular height only appears as H in the "Volume from b, H and h" mode.
Why do I get an invalid-triangle error? The three side lengths must obey the triangle inequality: the sum of any two sides must exceed the third. Otherwise Heron's formula has no real result.
Does it convert units? No. The unit dropdown only labels the output (length, area as unit², volume as unit³). Enter every length in the same unit.