Law of Cosines Calculator

Find the third side of a triangle from two sides and the included angle, plus the remaining angles. Enter two sides and the angle between them.

Side c
Opposite angle C.

Usage Tip

The law of cosines is the go-to for SAS and SSS triangles, where the law of sines alone is not enough.

THE MATH
c² = a² + b² − 2ab×cos(C)
A generalization of the Pythagorean theorem
The law of cosines finds the third side when two sides and their included angle are known.
When the angle is 90 degrees, the cosine term vanishes and it becomes the Pythagorean theorem.
Enter the two sides and the angle between them (the included angle).
The other two angles and the area are also computed.
The angle must be between 0 and 180 degrees.
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.