Law of Cosines Calculator

Solve triangles using Law of Cosines. Free online law of cosines calculator.

The Law of Cosines Calculator solves triangles using c² = a² + b² - 2ab·cos(C) and its variations. This generalization of the Pythagorean theorem works for any triangle, not just right triangles. Enter known sides and angles to find missing measurements in SAS and SSS triangle problems.

Common use cases

  • Navigation distance calculations
  • Surveying and mapping
  • Physics force problems
  • Architecture and construction
  • Astronomy orbital calculations

How to use

  1. For SAS: enter two sides and included angle
  2. For SSS: enter all three sides
  3. Click calculate for missing values
  4. View all sides and angles
  5. See the calculation steps

FAQ

What is the Law of Cosines?

c² = a² + b² - 2ab·cos(C). It relates the three sides and one angle of any triangle.

How is it related to Pythagorean theorem?

When C = 90°, cos(C) = 0, and it becomes c² = a² + b²—the Pythagorean theorem!

When do I use Law of Cosines?

Use for SAS (two sides and included angle) or SSS (all three sides known).

How do I find an angle from three sides?

Rearrange: cos(C) = (a² + b² - c²)/(2ab), then take arccos.