What Is the Law of Cosines?
The Law of Cosines relates a triangle's sides and angles, useful for solving any triangle (not just right triangles) when you know two sides and the included angle.
Solve triangles using the law of cosines.
The Law of Cosines relates a triangle's sides and angles, useful for solving any triangle (not just right triangles) when you know two sides and the included angle.
Useful for solving oblique (non-right) triangles that the standard Pythagorean theorem can't handle.
Input sides a and b.
Input the angle C between those two sides.
Side c updates automatically.
c² = a² + b² - 2ab×cos(C), where C is the angle between sides a and b.
The Pythagorean theorem only works for right triangles; the Law of Cosines works for any triangle.
cos(90°) = 0, so the formula reduces to the standard Pythagorean theorem.
This calculator solves for the third side - rearranging the formula can also solve for angles given three sides.
No, calculations happen entirely in your browser.
Navigation, surveying, and engineering all use the Law of Cosines to solve non-right triangle problems.
Yes, this calculator expects the angle in degrees.
Yes, decimal measurements are fully supported.
Yes, both are tools for solving oblique triangles, used in different scenarios depending on known information.
Yes, completely free with no sign-up required.