Triangle solver

Give any three measurements; get every side, angle and the area back.

Side a
3
Side b
4
Side c
5
Angle A
36.8699°
Angle B
53.1301°
Angle C
90°
Area
6

Heron's formula

Perimeter
12

Solved by the Law of cosines (SSS). This is a right triangle.

To scale

ABC

How it works

Three independent measurements fix a triangle completely — with one famous exception. Which three you have determines which law does the work.

Law of sines: a / sin A = b / sin B = c / sin C Law of cosines: c² = a² + b² − 2ab·cos C Heron's area: s = (a+b+c)/2, area = √(s(s−a)(s−b)(s−c))

Which case is which

SSS — three sides
Law of cosines, rearranged to give each angle. Always exactly one triangle.
SAS — two sides and the angle between them
Law of cosines for the third side, then the law of sines. Always exactly one triangle.
ASA / AAS — two angles and any side
The third angle is 180° minus the other two; the law of sines gives the remaining sides.
SSA — two sides and an angle not between them
The ambiguous case: zero, one or two triangles can fit. This solver asks you to disambiguate rather than silently pick one.

The triangle inequality

Any two sides must add to more than the third. 3, 4 and 8 cannot form a triangle — the short sides cannot reach across. The solver checks this before doing anything else.

Right triangles

When one angle is 90°, the law of cosines collapses to a² + b² = c², because cos 90° = 0. Pythagoras is the special case, not a separate rule.