How to Calculate Law of Cosines
What is Law of Cosines?
The Law of Cosines relates the three sides of any triangle to one of its angles. It generalises the Pythagorean theorem: when the angle C = 90°, cos(C) = 0 and the formula reduces to a² + b² = c².
Step-by-Step Guide
- 1Label the triangle sides a, b, c and opposite angles A, B, C
- 2To find side c: c² = a² + b² − 2ab·cos(C)
- 3To find angle C: cos(C) = (a² + b² − c²) / 2ab
Worked Examples
Input
a=8, b=11, C=37°
Result
c ≈ 6.67
c²=64+121−2(8)(11)cos(37°)
Input
a=5, b=7, c=10
Result
C ≈ 111.8°
cos(C)=(25+49−100)/70=−0.37
Ready to calculate? Try the free Law of Cosines Calculator
Try it yourself →