Law of Cosines: Find the Angles from Three Sides

Finds the three angles (in degrees) from the three sides with the law of cosines cos A = (b² + c² − a²) ÷ 2bc.

When all three sides are known, the law of cosines rearranged for the cosine hands you every angle of the triangle. An inverse cosine turns each value back into an angle.

cosA=b2+c2a22bc\cos A = \dfrac{b^2 + c^2 - a^2}{2bc}

In the numerator you always subtract the square of the side opposite the angle you want. Subtract the wrong one and you get a different angle.

Example

With a=5a = 5, b=6b = 6 and c=7c = 7:

cosA=62+72522×6×7=6084=57\cos A = \dfrac{6^2 + 7^2 - 5^2}{2 \times 6 \times 7} = \dfrac{60}{84} = \dfrac{5}{7}

which gives A44.4153A \approx 44.4153^\circ. Likewise cosB=3870=1935\cos B = \dfrac{38}{70} = \dfrac{19}{35}, so B57.1217B \approx 57.1217^\circ, leaving C78.4630C \approx 78.4630^\circ. The three add to exactly 180180^\circ.

Notes