Law Of Cosines Calculator
Calculate the missing side or angle of a triangle using the Law of Cosines. Enter any three values (sides a, b, c and angle C) to compute the fourth.
Result
Please check your inputs.
How to Use This Tool
Enter the three known values among sides a, b, c and angle C into the corresponding input fields.
Leave the field for the value you want to calculate completely blank.
Click the 'Calculate' button to run the computation.
View the result, which will be the missing side length or angle measure, displayed instantly.
What Is Law Of Cosines Calculator?
The Law of Cosines is a fundamental rule in trigonometry that applies to any triangle, not just right triangles. It relates the lengths of the three sides to the cosine of one of its angles. This calculator helps you quickly find a missing side or angle when you have three known values, making it invaluable for geometry problems, surveying, navigation, and engineering. By automating the formula, it saves time and reduces errors, letting you focus on interpreting results rather than crunching numbers.
Formula
The Law of Cosines states: c² = a² + b² − 2ab·cos(C). In this formula, a, b, and c are the lengths of the three sides of the triangle, and C is the angle opposite side c. The tool can solve for any one of these four values when the other three are known. For angles, the formula is rearranged to cos(C) = (a² + b² − c²) / (2ab).
Tips for Best Results
🌐 Use this tool when you have two sides and the included angle (SAS) or all three sides (SSS) — it's designed for exactly those cases.
📐 Make sure your angle is in the correct unit (degrees or radians) as expected by the calculator; wrong units lead to wrong results.
🔄 To find an angle, enter all three sides and leave the angle C blank — the tool will automatically apply the rearranged formula.
✅ Always verify that your three input values satisfy the triangle inequality (sum of any two sides > the third) or the tool will give an invalid result.
Frequently Asked Questions
What is the Law of Cosines and when should I use it?
The Law of Cosines relates the sides of any triangle to the cosine of one of its angles. Use it when you know two sides and the included angle (SAS) or all three sides (SSS) to find the missing side or angle.
Can I use this calculator for right triangles?
Yes, it works perfectly for right triangles too. For a right angle (90°), cos(90°) = 0, so the formula simplifies to the Pythagorean theorem (c² = a² + b²).
What units do I need to use for sides and angles?
Sides can be in any consistent length unit (e.g., meters, feet, inches). Angles must be in degrees or radians — check the tool's setting before entering. The calculator assumes all inputs are in the same unit.