When to use this calculator
The cosine rule extends the Pythagorean theorem to triangles without a right angle.
Explore the trigonometry calculators for other questions in this topic. For a related calculation, use the Law of Sines Side Calculator: Find a triangle side using two known opposite angle-side relationships.
PUTTING IT INTO PRACTICE
Law of Cosines: a worked example
The values below are an illustrative example, not a recommendation. Replace them with measurements or assumptions that match your question.
| Input | Example value |
|---|---|
| First side | 3 |
| Second side | 4 |
| Included angle (degrees) | 90 |
| Result | 5 units |
- Check the input labels and enter the example values above.
- Apply the relationship: Third side = √(a² + b² − 2ab cos C).
- The result is 5 units, rounded for display.
How to interpret your result
The angle must be between the two known sides; zero and 180 degrees are degenerate cases.
These tools take degrees unless stated otherwise. A right-triangle ratio and the law of cosines solve different input patterns. For the sine rule, identify which side is opposite each supplied angle.
Frequently asked questions
Are the angle inputs in degrees or radians?
The trigonometry tools here label angles in degrees and convert internally. Use the degree-to-radian converter when another formula requires radians.
When is the law of cosines calculator useful?
The cosine rule extends the Pythagorean theorem to triangles without a right angle.
How do I use the law of cosines calculator?
Enter first side, second side, included angle (degrees). The result updates automatically. Use the units shown beside each input; the example values illustrate the method.
Which formula does this calculator use?
Third side = √(a² + b² − 2ab cos C).
What should I check before using the result?
The angle must be between the two known sides; zero and 180 degrees are degenerate cases.
How are results rounded?
Scalar numbers display up to six decimal places, with scientific notation for very large or small values. Text, fraction, date and schedule outputs use the format described on the tool. Intermediate calculations use JavaScript floating-point arithmetic. Keep sensible precision for your measurements.
Further reading
For background on this topic, see OpenStax: basic functions and identities ↗. This is a topic reference, not an external review or endorsement of this tool.
Calculators Map editorial process · Updated · Methods and limitations