Calculator Scope

Calculator Scope - Smart Online Calculators for Everything

From math, science, finance, health, and construction to marketing, text tools, developer utilities, and more. All calculators in one fast, accurate, easy-to-use platform.

Law of Cosines Calculator

Law of Cosines Calculator

Result
Calculator Scope
Advertisement 1
Advertisement 2
This calculator uses the law of cosines to find the third side and the two remaining angles of a triangle, given two sides and the angle between them.

Enter two side lengths and the angle between them (the included angle), and this calculator solves for the third side and the other two angles.

The law of cosines generalizes the Pythagorean theorem to work for any triangle, not just right triangles — and that connection is exact, not approximate: when the included angle is exactly 90°, cos(90°) equals zero, and the formula collapses precisely into the familiar c² = a² + b². This makes it the right tool whenever a triangle problem gives you two sides and the angle between them (a scenario the more basic Pythagorean theorem can't handle on its own), which comes up constantly in surveying, navigation, and engineering problems involving non-right triangles.

Advertisement 3
  • The law of cosines states that c² = a² + b² − 2ab·cos(C), generalizing the Pythagorean theorem to work for any triangle, not just right triangles.
  • When the included angle is exactly 90°, cos(90°) = 0, and the formula reduces exactly to the Pythagorean theorem, c² = a² + b².
  • Once the third side is known, the remaining angles are found using the law of cosines again (solved for an angle instead of a side), rather than the law of sines, to avoid ambiguity.

How does the law of cosines work?

It relates all three sides and one angle: c² = a² + b² − 2ab·cos(C), where C is the angle between sides a and b. Solving for c gives the third side directly.

If two sides are 5 and 7 with a 49° angle between them, what is the third side?

c = √(5² + 7² − 2×5×7×cos(49°)) ≈ 5.30.