math
Law of Cosines Calculator
Find the third side of a triangle from two sides and the included angle (SAS).
Side c (opposite C)
5
c = √(a² + b² − 2ab·cos C)
How it works
- 1Enter two sides (a and b) and the angle C between them.
- 2The law of cosines gives c = √(a² + b² − 2ab·cos C).
- 3Read the length of the third side, opposite angle C.
Use cases
- Find a missing side when you know two sides and the angle between them.
- Solve non-right triangles (the law of cosines generalises Pythagoras).
- Check trigonometry homework using the cosine rule.
Frequently asked questions
What is the law of cosines?
For any triangle, c² = a² + b² − 2ab·cos C, where C is the angle between sides a and b. It generalises the Pythagorean theorem.
When does it reduce to Pythagoras?
When C = 90°, cos C = 0, so c² = a² + b² — exactly the Pythagorean theorem.
What input does it need?
Two sides and the included angle (the angle between them), known as the SAS case.
Related tools
See all →Rectangle Calculator
Calculate the area and perimeter of a rectangle from its width and height, with a labeled diagram.
Circle Calculator
Calculate the area and circumference of a circle from its radius, with a labeled diagram.
Triangle Calculator
Calculate the area (Heron’s formula) and perimeter of a triangle from its three sides.
Trapezoid Calculator
Calculate the area and perimeter of a trapezoid from its two parallel sides, height, and legs.