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 entereda=3, b=4, c=5a = 3,\ b = 4,\ c = 5

36.869898∘\displaystyle 36.869898^\circ
Show the work
  1. Law of cosines

    The law of cosines, rearranged, gives the angle AA opposite side aa from all three sides. Here a=3a = 3, b=4b = 4 and c=5c = 5.

    cos⁡A=b2+c2−a22bc=42+52−322×4×5=3240=0.8\begin{aligned} \cos A &= \frac{b^2 + c^2 - a^2}{2bc} \\ &= \frac{4^2 + 5^2 - 3^2}{2 \times 4 \times 5} \\ &= \frac{32}{40} \\ &= 0.8 \end{aligned}
  2. Inverse cosine

    The inverse cosine finds the angle, between 0∘0^\circ and 180∘180^\circ, that has this cosine.

    A=cos⁡−1(0.8)=36.869898∘\begin{aligned} A &= \cos^{-1}\left(0.8\right) \\ &= 36.869898^\circ \end{aligned}
  3. Result

    So the angle AA is 36.869898∘36.869898^\circ.

Worked examples