How to Solve a Triangle
“Solving” a triangle means finding every unknown side and angle from the ones you know. You always need three pieces of data, and at least one of them must be a side — three angles alone only fix the shape, not the size. This calculator takes the three values you have, under the SSS, SAS or ASA pattern they match, and returns the complete picture: the remaining sides and angles, the area and the perimeter, with the law-of-cosines, law-of-sines and Heron steps written out beneath the results. It also refuses impossible data, such as sides that cannot meet, instead of dressing up nonsense as an answer.
The Laws and Their Symbols
The labelling convention pairs each side with the angle opposite it: side a lies opposite angle A, side b opposite B, and side c opposite C. The law of cosines, c² = a² + b² − 2ab·cos C, connects all three sides with one angle: a and b are the sides forming angle C, c is the side across from it, and cos C is the cosine of that included angle — set C = 90° and cos C = 0, collapsing the law into Pythagoras. The law of sines states a plain proportion, a ⁄ sin A = b ⁄ sin B = c ⁄ sin C: each side divided by the sine of its opposite angle gives the same number. Heron’s formula uses one extra symbol, s, the semi-perimeter (a + b + c)/2, and gives area = √[s(s−a)(s−b)(s−c)].
How to Use This Triangle Calculator
- Pick the tab matching your data: SSS for three sides, SAS for two sides and the included angle, or ASA for two angles and the side between them. The three input labels change with the tab — SAS asks for Side a, Side b and Included angle C, while ASA asks for Angle A, Side c and Angle B.
- Type your three values, remembering that angles are in degrees and every entry must be positive. The solver recalculates as you type; there is no solve button.
- Read the dark results grid: Side a, b and c, angles A, B and C, Area and Perimeter, followed by the numbered working steps. An amber message instead means the values are incomplete or cannot form a triangle.
The Three Cases
- SSS (three sides): angles come from the law of cosines, e.g. cos A = (b² + c² − a²) / 2bc.
- SAS (two sides + included angle): the third side comes from the law of cosines, then the law of sines finishes the angles.
- ASA (two angles + included side): the third angle is 180° minus the other two, then the law of sines gives the remaining sides.
Watch Out For
Not every trio of numbers makes a triangle: sides 2, 3, 10 violate the triangle inequality. And SSA (two sides and a non-included angle) is the famous ambiguous case that can yield zero, one, or two valid triangles — a deeper topic for another day.
Worked Example 1: SSS With Sides 3, 4 and 5
Enter a = 3, b = 4 and c = 5 on the SSS tab. With all sides known, each angle comes from rearranging the law of cosines, starting with the angle opposite side a.
- Angle A: cos A = (b² + c² − a²) / 2bc = (16 + 25 − 9) / 40 = 0.8, so A = cos⁻¹(0.8) ≈ 36.87°.
- Angle B: cos B = (a² + c² − b²) / 2ac = (9 + 25 − 16) / 30 = 0.6, so B = cos⁻¹(0.6) ≈ 53.13°.
- Angle C: C = 180° − 36.87° − 53.13° = 90° — the familiar right angle of the 3-4-5 triangle.
- Area: s = (3 + 4 + 5)/2 = 6, so area = √(6 × 3 × 2 × 1) = √36 = 6, and the perimeter is 12.
The angles total 36.87° + 53.13° + 90° = 180°, exactly as every triangle demands, and Heron’s area of 6 agrees with ½ × 3 × 4 for a right triangle with legs 3 and 4.
Worked Example 2: SAS With a = 8, b = 5 and C = 60°
On the SAS tab, enter Side a = 8, Side b = 5 and Included angle C = 60°. Because the angle sits between the two known sides, the law of cosines reaches straight across it to the missing side c.
- Missing side: c² = a² + b² − 2ab·cos C = 64 + 25 − 80 × 0.5 = 49, so c = 7.
- Angle A by the law of sines: sin A = a·sin C / c = 8 × sin 60° / 7 ≈ 0.9897, so A ≈ 81.79°.
- Angle B: B = 180° − 81.79° − 60° = 38.21°.
- Area and perimeter: area = ½ab·sin C = ½ × 8 × 5 × sin 60° ≈ 17.32, and the perimeter is 8 + 5 + 7 = 20.
Check the angle sum: 81.79° + 38.21° + 60° = 180°. The law of cosines can cross-check angle A as well: cos A = (25 + 49 − 64) / 70 ≈ 0.1429, giving the same 81.79°.
When Solving a Triangle Solves a Real Problem
A builder cutting a triangular gable knows two wall lengths and the pitch angle between them, and needs the rafter length — a pure SAS job. A landowner with three measured boundary lengths gets the plot’s corner angles and its area for fencing and records from SSS. A navigator who sights two landmarks at known angles from the ends of a measured baseline fixes both distances by ASA. Gardeners pricing turf for a triangular lawn, and carpenters bracing a gate with a diagonal, are solving the same three cases in work clothes.
Three Mistakes Triangle Solvers Punish
- Feeding SAS a non-included angle: the SAS tab treats its third input as angle C, the angle between sides a and b. Enter an angle from elsewhere in the triangle and every result that follows is quietly wrong, however neat it looks.
- Letting ASA angles total 180° or more: two angles of 100° and 85° leave nothing for the third angle, so no triangle exists. The two entered angles must sum to less than 180°, with the difference becoming angle C.
- Breaking the side–angle pairing: side c in ASA must be the side between angles A and B, and in SSS each computed angle sits opposite its named side. Relabelling the diagram midway swaps answers between corners.
Solving the equations behind these laws by hand? Try our equation solver or the scientific calculator.