Triangle Solver (law of sines & cosines)

Solve any triangle from three known measures using the law of sines and cosines — every side, angle, area, perimeter, and a scaled diagram.

Fill in any three values, including at least one side. Sides are lengths; angles are in degrees. Each angle is opposite the side of the same letter (angle A is opposite side a).

Solving a triangle

A triangle has six measures — three sides and three angles — and they're locked together, so knowing the right three lets you find the other three. This solver uses the two rules that connect them, and reports every side and angle, the area, the perimeter, and what kind of triangle you have, with a diagram drawn to scale.

Law of sines: a / sin A = b / sin B = c / sin C

Law of cosines: c² = a² + b² − 2ab·cos C

Which three you need

Any three measures work except three angles alone — those fix the shape but not the size, so you always need at least one side. The named cases are SSS (three sides), SAS (two sides and the angle between them), ASA and AAS (two angles and a side), and SSA (two sides and an angle not between them). The law of cosines cracks SSS and SAS; the law of sines handles the cases where you know an angle and its opposite side.

The ambiguous case (SSA)

SSA is special: two sides and a non-included angle can describetwo different triangles, one acute and one obtuse, because the sine of an angle and of its supplement are equal. When that happens the solver shows both valid triangles rather than guessing which you meant. It can also describe no triangle at all, if the side opposite the known angle is too short to reach.

Worked example

Enter sides a = 3 and b = 4 with the angle between them C = 90°. The law of cosines gives c = √(3² + 4²) = 5, then the remaining angles come out to 36.87° and 53.13° — the familiar 3-4-5 right triangle, area 6. Clear a side and enter two angles instead to see the law of sines scale the triangle to whatever single side you provide.