Law of Cosines Calculator

Find a side or an angle of a triangle with the law of cosines.

Leave empty if unknown

Leave empty if unknown

Leave empty if unknown

Leave empty if unknown

Try

Result

You enteredb=5, c=7, A=60∘b = 5,\ c = 7,\ A = 60^\circ

6.244998\displaystyle 6.244998
Show the work
  1. Law of cosines

    The law of cosines extends Pythagoras' theorem to any triangle: it gives the side opposite a known angle from the two sides beside it. Here b=5b = 5, c=7c = 7 and the angle between them is A=60∘A = 60^\circ.

    a2=b2+c2−2bccos⁡A=52+72−2×5×7×cos⁡60∘=25+49−35=39\begin{aligned} a^2 &= b^2 + c^2 - 2bc\cos A \\ &= 5^2 + 7^2 - 2 \times 5 \times 7 \times \cos 60^\circ \\ &= 25 + 49 - 35 \\ &= 39 \end{aligned}
  2. Take the square root

    The side is a length, so take the positive square root of a2a^2.

    a=39=6.244998\begin{aligned} a &= \sqrt{39} \\ &= 6.244998 \end{aligned}
  3. Result

    So the side aa is 6.2449986.244998.

Worked examples