Triangle Solver (Sine Rule and Cosine Rule)
Find every side and angle of a triangle, with a drawing and the working.
What the triangle solver does
A triangle has three sides (a, b, c) and three angles (A, B, C), where each angle is opposite the side with the same letter. If you know any three of these, including at least one side, the other three can be found. Choose the tab that matches what you know, enter the values, and the solver gives every side and angle, the area, the perimeter, the type of triangle, and a labelled drawing. It uses the cosine rule and the sine rule and shows the working.
Which tab to use
| You know | Tab | Method |
|---|---|---|
| All three sides | SSS | Cosine rule for the angles |
| Two sides and the angle between them | SAS | Cosine rule for the third side |
| Two angles and the side between them | ASA | Third angle, then the sine rule |
| Two angles and a side that is not between them | AAS | Third angle, then the sine rule |
| Two sides and an angle that is not between them | SSA | Sine rule, and it may have two answers |
The rules
- Cosine rule: c² = a² + b² − 2ab cos C, and cos C = (a² + b² − c²) ÷ (2ab).
- Sine rule: a ÷ sin A = b ÷ sin B = c ÷ sin C.
- Angles: A + B + C = 180°.
- Area: ½ × a × b × sin C.
Worked examples
- SSS: sides 3, 4 and 5 give angles 36.87°, 53.13° and 90°, a right-angled triangle with area 6.
- SAS: a = 7, b = 10 and C = 40° give c = 6.4617, A = 44.13°, B = 95.87° and an area of 22.4976.
- ASA: A = 50°, B = 60° and c = 10 give C = 70°, a = 8.1521 and b = 9.216.
- AAS: A = 40°, B = 70° and a = 8 give C = 70°, b = 11.6952 and c = 11.6952 (an isosceles triangle).
The ambiguous case (SSA)
When you know two sides and an angle that is not between them, there can be 0, 1 or 2 triangles. With a = 6, b = 8 and A = 30°, sin B = 8 × sin 30° ÷ 6 = 0.6667, so B can be 41.81° or 180° − 41.81° = 138.19°. Both fit: the first gives C = 108.19° and c = 11.40, the second gives C = 11.81° and c = 2.46. The solver shows both, drawn side by side. If side a is too short (for example a = 3), sin B is more than 1 and no triangle exists.
The drawing has Download PNG and Download SVG buttons, so you can save it for homework, a report or a slide.
For the area of a triangle from its sides, or a right triangle, you can also use the triangle calculator and the right triangle calculator.
How to cite this page
CalcPulse. (2026). Triangle Solver. https://calcpulse.com/triangle-solver/
Frequently asked questions
How do I solve a triangle?
Choose what you know (for example three sides, or two sides and the angle between them), enter the values, and the solver finds the rest using the cosine rule and the sine rule.
What is the ambiguous case?
When you know two sides and an angle that is not between them (SSA), there can be two different triangles, one, or none. The solver shows both solutions when two exist.
When do I use the sine rule and when the cosine rule?
Use the cosine rule when you know three sides, or two sides and the angle between them. Use the sine rule when you know two angles, or a side and its opposite angle.
Can I solve a triangle with three angles?
No. Three angles only give the shape, not the size. You need at least one side.
Which units are used?
Angles are in degrees. Sides can be in any unit, as long as they are all the same.
Last updated