Law of Cosines Calculator
Two parts: in A, give two sides and the angle between them to find the third side; in B, give all three sides to find any angle.
A. Missing Side — c = √(a² + b² − 2ab cos C)
B. Missing Angle — cos C = (a² + b² − c²) / (2ab)
How to use
- Pick Part A to find a missing side, or Part B to find a missing angle.
- In Part A, enter two sides and the angle between them, in degrees.
- In Part B, enter all three side lengths to solve for angle C.
- Read the answer plus the step-by-step breakdown showing the substitution.
Note: Cosine rule: c² = a² + b² − 2ab cos C. It works on any triangle, not only right triangles.
Tips
- Angles must be in degrees — entering radians is the most common mistake.
- Part A needs the angle between the two known sides (the included angle), not just any angle.
- The cosine rule works on any triangle, including obtuse ones — that is when it beats Pythagoras.
Frequently Asked Questions (FAQ)
How does the law of cosines calculator work?
Part A finds the third side from two sides and the included angle; Part B finds any angle from all three sides.
What is the law of cosines?
It relates the sides of a triangle: c squared = a squared + b squared minus 2ab cos C.
Should angles be in degrees?
Yes. Enter angles in degrees, as labelled on the inputs.
Is this calculator free?
Yes, it is completely free to use, with no signup or account needed.