Law of Cosines Calculator

c² = a² + b² − 2ab·cos(C). Solve any triangle given SAS or SSS.

Inputs

Result

Side c
7.211103
c² = 8² + 6² − 2(8)(6)cos(60°) = 52.0000.
  • Side a8
  • Side b6
  • Angle C60°
  • Side c7.211103
  • Angle A73.8979°
  • Angle B46.1021°
  • Area½ab sin C20.784610

Step-by-step

  1. c² = a² + b² − 2ab cos C = 64 + 36 − 48.0000 = 52.0000.
  2. c = √52.0000 = 7.2111.
  3. A = arccos((b² + c² − a²) / 2bc) = 73.8979°.
  4. B = 180° − A − C = 46.1021°.

How to use this calculator

  • Enter two sides and the included angle (SAS).
  • Read third side and other angles.

About this calculator

Law of cosines: c² = a² + b² − 2ab·cos(C). Generalizes Pythagorean theorem (when C = 90°, cos C = 0, giving c² = a² + b²). Used to solve SAS triangles (two sides + included angle) or SSS (three sides — solve for any angle: cos(A) = (b² + c² − a²)/(2bc)). Also gives triangle area via ½ab·sin(C).

Frequently asked

When C = 90°, cos(C) = 0, so c² = a² + b² (the Pythagorean theorem).

Related calculators