Law of Cosines Calculator
Find a triangle's third side from two sides and the angle between them, or its angles from three sides, with the law of cosines.
Change the values and press Calculate to work out your own figures.
Third side (SAS)
Enter two sides and the angle between them.
Show the working
- Two sides and the angle between them: the third side from the law of cosines, a² = b² + c² − 2bc cos A
- Area = √(s(s − a)(s − b)(s − c)) = 169.9327101
Angles (SSS)
Enter the three sides.
Show the working
- Three sides: each angle from the law of cosines, cos A = (b² + c² − a²) ÷ 2bc
- Area = √(s(s − a)(s − b)(s − c)) = 26.83281573
How to use it
Enter two sides and the angle between them. Enter the three sides.
Enter the values you know (decimals, fractions, surds such as 2√5, or angles such as π/3 in radians). Show the working gives the rule used at each step.
Key facts
a² = b² + c² − 2bc cos A
A generalised Pythagoras
With A = 90°, cos A = 0 and the law of cosines becomes a² = b² + c².
Questions
What is side a with b = 25, c = 15 and A = 65°?
≈ 23.08757899.
When do I use it?
Two sides and the angle between them, or all three sides.
Formulas
a² = b² + c² − 2bc cos A
Sources
Limitations
- Angles can be typed in degrees or radians; radians may be written with π (π/3, 2pi/3).