Triangle Solver

Solve any triangle from SSS, SAS, ASA, or AAS — every side, angle, and step shown, drawn to scale.

How to Solve Any Triangle

Choose the case that matches what you know: three sides (SSS), two sides and the included angle (SAS), or two angles and a side (ASA or AAS). The solver finds everything else.

1

SSS: angles from three sides

The law of cosines, cos A = (b² + c² − a²) / 2bc, turns three side lengths into angles. The solver first checks the triangle inequality: each side has to be shorter than the other two combined, or no triangle exists.

2

SAS: the third side, then the angles

With two sides and the angle between them, the law of cosines gives the third side, a² = b² + c² − 2bc·cos A. The remaining angles follow from the law of cosines again, and they always add up to 180°.

3

ASA and AAS: the third angle, then the sides

Two angles fix the third, since the angles sum to 180°. The law of sines, a/sin A = b/sin B = c/sin C, then scales the known side to the other two. Area comes from Heron's formula or ½ab·sin C.

Frequently Asked Questions

What is the difference between ASA and AAS?
In ASA the known side lies between the two known angles; in AAS it is opposite one of them. Both give a unique triangle, and both are solved by finding the third angle and then applying the law of sines.
When do you use the law of cosines instead of the law of sines?
Use the law of cosines when you know three sides (SSS) or two sides and the angle between them (SAS). Use the law of sines when you know two angles and a side, or a side and the angle opposite it.
Why is SSA not one of the cases?
Two sides and an angle that is not between them is the ambiguous case: depending on the numbers it can give zero, one or two different triangles, so it does not pin down a single answer.
How do you find the area of a triangle from three sides?
Use Heron's formula. Compute the semi-perimeter s = (a + b + c)/2, then area = √(s(s − a)(s − b)(s − c)). For sides 3, 4 and 5, s = 6 and the area is √(6·3·2·1) = 6.