Law of Cosines Calculator
Calculate the missing side or angle of a triangle using the Law of Cosines: c² = a² + b² − 2ab cos(C).
This free online law of cosines calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.
The angle between sides a and b
Results
Side c
6.245 units
How to Use This Calculator
Enter your input values
Fill in all required input fields for the Law of Cosines Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.
Review your inputs
Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.
Read the results
The Law of Cosines Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.
Explore parameter sensitivity
Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.
Formula Reference
Law of Cosines Calculator Formula
See calculator inputs for the governing equation
Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.
When to Use This Calculator
- •Use the Law of Cosines Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
- •Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
- •Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
- •Use it to explore the behavior of mathematical functions across a range of inputs.
About This Calculator
The Law of Cosines Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Calculate the missing side or angle of a triangle using the Law of Cosines: c² = a² + b² − 2ab cos(C). The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.
About Law of Cosines Calculator
The Law of Cosines is a generalization of the Pythagorean theorem that works for any triangle, not just right triangles. It states that c² = a² + b² − 2ab cos(C), where C is the angle between sides a and b, and c is the side opposite angle C. When C = 90°, cos(C) = 0 and the formula reduces to the Pythagorean theorem. The Law of Cosines can be used to find a missing side when two sides and the included angle are known (SAS), or to find an angle when all three sides are known (SSS). It is fundamental in surveying, navigation, physics, and engineering. This calculator finds the third side given two sides and the included angle. The law was first stated by Euclid in a geometric form and later generalized using trigonometric notation.
The Math Behind It
Formula Reference
Law of Cosines
c² = a² + b² − 2ab cos(C)
Variables: a, b = known sides; C = included angle; c = opposite side
Worked Examples
Example 1: Surveying a plot
Two sides measure 100 m and 80 m with a 45° angle between them.
c ≈ 71.32 m
Common Mistakes & Tips
- !Using degrees instead of radians in a calculator set to radian mode (or vice versa).
- !Forgetting the minus sign in the formula (it is −2ab cos(C)).
- !Applying the Law of Cosines when the Law of Sines would be simpler and sufficient.
Related Concepts
Used in These Calculators
Calculators that build on or apply the concepts from this page:
Frequently Asked Questions
When should I use the Law of Cosines instead of the Law of Sines?
Use the Law of Cosines for SAS (two sides and included angle) or SSS (all three sides) cases. The Law of Sines is better for ASA, AAS, and some SSA cases.
Can the result be negative under the square root?
No, as long as the inputs form a valid triangle. The expression a² + b² − 2ab cos(C) is always non-negative for 0° < C < 180°.