Law of Cosines Calculator

Enter the known measurements; all results update as you type, with the formula and steps.

Formula

c² = a² + b² − 2ab cos C

Worked example

a = 5, b = 7, C = 60°: c = 6.245.

Frequently asked questions

How is it related to Pythagoras?

When C = 90°, cos C = 0 and the formula becomes c² = a² + b².

Can I find angles from three sides?

Yes, rearrange: cos C = (a² + b² − c²) / 2ab.

Which unit for angles?

Degrees.

Related calculators

Results are estimates for information only. Check important figures with a professional.