How to Find All Three Angles When You Know All Three Sides

The short answer

cos A = (b² + c² – a²) / 2bc

The cosine rule turns any side into the angle facing it. Do the largest angle first, repeat for one more, then subtract both from 180 to get the third.

Three side lengths pin a triangle down completely. There is exactly one shape they can make, so the angles are already decided and only need extracting. The cosine rule is the tool that does it, and the only real decision is the order you work in.

Why the largest angle goes first

It is tempting to find one angle with the cosine rule and then switch to the sine rule, which looks like less arithmetic. That shortcut is where people lose marks, because sine cannot tell an acute angle from an obtuse one. Both 130 degrees and 50 degrees have a sine of about 0.766, and a calculator asked for the inverse sine always hands back the acute one.

Take a triangle with sides of 5, 6 and 10. The angle facing the 10 is genuinely 130.54 degrees, but its sine is 0.7599, and asking a calculator for the inverse sine of that returns 49.46 degrees. That is a real number belonging to nothing in this triangle, and nothing on the page flags it.

Two habits avoid this entirely. Either use the cosine rule for every angle, since it returns obtuse angles correctly as a negative cosine, or find the largest angle first with the cosine rule. Only one angle in a triangle can exceed 90 degrees, and it always faces the longest side, so once it is out of the way everything remaining is acute and safe.

1

Find the longest side

The angle facing it is the largest, and the only one that could be obtuse.

2

Apply the cosine rule twice

Once for that angle, once for another. A negative cosine simply means the angle is obtuse.

3

Subtract from 180

The third angle is free, and the sum is your check that nothing went wrong.

A worked example

Take the 13, 14, 15 triangle. The longest side is 15, so start with the angle facing it. The cosine rule gives 13 squared plus 14 squared minus 15 squared, over 2 times 13 times 14, which is 140 over 364, or 0.3846. The inverse cosine of that is 67.38 degrees.

Now the angle facing 14. That works out as a cosine of 0.5077, giving 59.49 degrees. The last angle needs no formula at all: 180 minus 67.38 minus 59.49 leaves 53.13 degrees.

The three angles sum to exactly 180, which is the check. If yours lands on 179.9 that is rounding, but anything further off means an arithmetic slip worth finding.

A 13, 14, 15 triangle with all three angles circled and labelled 67.38, 59.49 and 53.13 degrees, beside the cosine rule working that produced them and a check that they sum to 180.
Notice that the largest angle faces the longest side and the smallest faces the shortest. That ordering holds in every triangle and is worth using as a quick sanity check.

Inverse sine hides obtuse angles

On a triangle with sides of 5, 6 and 10, the angle facing the longest side is obtuse. Reach for the sine rule there and the calculator returns its acute twin instead, a number that looks reasonable and belongs to no part of the shape.

cosine rulegivescos = -0.65130.54

a negative cosine returns the obtuse angle directly

sine rulegivessin = 0.759949.46

the acute twin, and nothing on the page marks it as wrong

Largest angle, longest side

In every triangle the angles come in the same order as the sides they face. The largest angle sits opposite the longest side and the smallest opposite the shortest. In the worked example the sides run 13, 14, 15 and the angles run 53.13, 59.49, 67.38 in exactly that order.

This is worth a glance at the end of any calculation. If your largest angle is not facing your longest side, two values have been paired up wrongly somewhere, and the sum can still come to 180 while the labels are swapped.

When the triangle turns out to be right angled

If one of the cosines comes out as exactly zero, that angle is 90 degrees and you have a right triangle. It falls out of the formula naturally, because a cosine of zero means the numerator was zero, which means the two shorter sides squared added to the longest squared. That is Pythagoras appearing as a special case of the cosine rule.

Mistakes that catch people out

  • Using the sine rule for the second angle. It cannot distinguish acute from obtuse, and it returns the acute answer either way.
  • Pairing an angle with the wrong side. Each angle faces the side of the same name. Check that the largest ends up opposite the longest.
  • Treating a negative cosine as an error. It means the angle is obtuse, which is a normal result the formula handles on its own.
  • Rounding partway through. Carry the cosine to at least four places. Rounding it before the inverse loses more than you would expect.
  • Leaving the calculator in radians. Test with the inverse cosine of zero, which should return 90 in degree mode.

Practice questions

  1. Sides of 3, 4 and 5. Find all three angles.
  2. Sides of 7, 8 and 9. Find the angle facing the 9.
  3. Sides of 5, 6 and 10. Find the angle facing the 10.
  4. Sides of 6, 6 and 6. Find all three angles.
  5. Sides of 8, 15 and 17. Find the angle facing the 17.
Show the answers
  1. cos of the angle facing 5 is zero, so 90 degrees, then 36.87 and 53.13
  2. cos = (49 + 64 – 81) / 112 = 0.2857, so 73.40 degrees
  3. cos = (25 + 36 – 100) / 60 = -0.65, so 130.54 degrees and obtuse
  4. every cosine is 0.5, so all three angles are 60 degrees
  5. cos = (64 + 225 – 289) / 240 = 0, so exactly 90 degrees

Common questions

How do I find the angles of a triangle from its three sides?

Use the cosine rule. For the angle facing side a, take b squared plus c squared minus a squared, divide by 2bc, then take the inverse cosine.

Which angle should I calculate first?

The one facing the longest side. It is the largest angle and the only one that could be obtuse, so getting it out of the way first makes the rest safe.

Why not use the sine rule for the second angle?

Because sine cannot distinguish an acute angle from an obtuse one. A calculator asked for an inverse sine always returns the acute answer, which may be the wrong one.

What does a negative cosine mean?

The angle is obtuse, meaning greater than 90 degrees. This is not an error, and the inverse cosine handles it correctly on its own.

Do the angles have to add to 180?

Yes, in flat geometry they always do. Use it as your check. A small gap is rounding, but a large one means a mistake in the working.

What if the three sides cannot form a triangle?

The cosine rule returns a value outside the range of minus one to one and the inverse cosine fails. Test the lengths with the triangle inequality first.

Related lessons and calculators