Law of Cosines Calculator
Use the Law of Cosines to find unknown sides or angles in a triangle. Supports SAS (Side-Angle-Side) and SSS (Side-Side-Side) cases. Get step-by-step solutions with detailed explanations and interactive triangle visualization!
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Law of Cosines Calculator
Welcome to our Law of Cosines Calculator, a comprehensive online tool for solving triangles using the Law of Cosines. Whether you're dealing with SAS (Side-Angle-Side) or SSS (Side-Side-Side) cases, our calculator provides accurate solutions with detailed step-by-step explanations and interactive visualizations.
What is the Law of Cosines?
The Law of Cosines (also known as the Cosine Rule) is a fundamental theorem in trigonometry that generalizes the Pythagorean theorem. It relates the sides of a triangle to the cosine of one of its angles. The law states:
$$c^2 = a^2 + b^2 - 2ab\cos(C)$$
where $a$, $b$, and $c$ are the lengths of the sides of a triangle, and $C$ is the angle opposite side $c$. Similarly, we can write:
$$a^2 = b^2 + c^2 - 2bc\cos(A)$$
$$b^2 = a^2 + c^2 - 2ac\cos(B)$$
When rearranged to solve for angles, the Law of Cosines becomes:
$$\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}$$
Key Features of Our Law of Cosines Calculator
- Multiple Case Support: Solve SAS and SSS triangle cases.
- Dual Angle Units: Works with both degrees and radians for maximum flexibility.
- Step-by-Step Solutions: Detailed explanations of each calculation step.
- Interactive Visualization: Graphical representation of the solved triangle.
- Triangle Inequality Check: Validates SSS inputs to ensure a valid triangle exists.
- Comprehensive Validation: Ensures all inputs are valid with meaningful error messages.
- Educational Tool: Perfect for students learning trigonometry and triangle geometry.
Understanding Triangle Cases
SAS (Side-Angle-Side)
When you know two sides and the angle between them, you can use the Law of Cosines to find the third side, then calculate the remaining angles.
- Given: Sides $a$ and $b$, and the angle $C$ between them
- Find: Side $c$, angles $A$ and $B$
- Solution: Unique (one solution)
- Formula: $c^2 = a^2 + b^2 - 2ab\cos(C)$
SSS (Side-Side-Side)
When you know all three sides of a triangle, you can use the Law of Cosines to find all three angles.
- Given: Sides $a$, $b$, and $c$
- Find: Angles $A$, $B$, and $C$
- Solution: Unique (one solution, if triangle exists)
- Important: The triangle inequality must be satisfied: the sum of any two sides must be greater than the third side
How to Use the Law of Cosines Calculator
- Select the case type: Choose SAS or SSS from the dropdown menu.
- Choose angle unit: Select degrees or radians.
- Enter your values:
- SAS: Input 1 = Side a, Input 2 = Side b, Input 3 = Angle C (the angle between sides a and b)
- SSS: Input 1 = Side a, Input 2 = Side b, Input 3 = Side c
- Click "Calculate" to get your solution.
- Review the step-by-step solution and triangle visualization.
Applications of the Law of Cosines
The Law of Cosines is widely used in various fields:
- Navigation: Determining distances and bearings in triangular paths.
- Astronomy: Calculating distances between celestial objects.
- Surveying: Land measurement and mapping applications.
- Engineering: Structural analysis, force calculations, and design.
- Physics: Vector analysis and resultant force calculations.
- Architecture: Roof design, structural support calculations.
- Computer Graphics: 3D modeling, collision detection, and rendering.
- Robotics: Path planning and inverse kinematics.
Mathematical Background
The Law of Cosines is a generalization of the Pythagorean theorem. When the angle $C = 90°$ (a right angle), $\cos(C) = 0$, and the formula reduces to:
$$c^2 = a^2 + b^2$$
This is exactly the Pythagorean theorem! The Law of Cosines works for all types of triangles: acute, obtuse, and right triangles.
Derivation
The Law of Cosines can be derived using coordinate geometry or by applying the Pythagorean theorem to a triangle that has been divided by an altitude.
Important Properties
- The sum of angles in any triangle is always $180°$ (or $\pi$ radians)
- In any triangle, the largest side is opposite the largest angle
- For the SSS case, the triangle inequality must hold: $a + b > c$, $a + c > b$, and $b + c > a$
- The Law of Cosines can be used to determine the type of triangle:
- If $c^2 < a^2 + b^2$, the triangle is acute
- If $c^2 = a^2 + b^2$, the triangle is right-angled
- If $c^2 > a^2 + b^2$, the triangle is obtuse
Why Use Our Law of Cosines Calculator?
- Accuracy: Precise calculations with proper rounding and error handling.
- Educational: Learn through detailed step-by-step solutions.
- Time-Saving: Get instant results instead of manual calculations.
- Comprehensive: Handles both SAS and SSS cases with complete validation.
- Visual Learning: See the triangle you're solving with our visualization feature.
- Free and Accessible: No registration required, use anytime, anywhere.
- Mobile Friendly: Works on all devices - desktop, tablet, and mobile.
Law of Cosines vs. Law of Sines
While both laws are used to solve triangles, they have different applications:
- Law of Cosines: Best for SAS and SSS cases
- Law of Sines: Best for ASA, AAS, and SSA (ambiguous) cases
- The Law of Cosines is more computationally stable for small angles
- Together, these laws can solve any triangle given sufficient information
Additional Resources
For more information on the Law of Cosines and triangle geometry, check out these resources:
Reference this content, page, or tool as:
"Law of Cosines Calculator" at https://MiniWebtool.com/law-of-cosines-calculator/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: Nov 18, 2025
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.
Related MiniWebtools:
Trigonometry Calculators:
- DMS to Decimal Degrees Converter New
- Law of Cosines Calculator New
- Law of Sines Calculator New
- Right Triangle Calculator New
- High-Precision Sine Calculator New
- High-Precision Hyperbolic Functions Calculator New
- Trigonometric Function Grapher New
- Arcsin (Inverse Sine) Calculator New
- Arccos (Inverse Cosine) Calculator New
- High-Precision Cosine Calculator New
- High-Precision Tangent Calculator New
- Cosecant/Secant/Cotangent Calculator New
- Arctan (Inverse Tangent) Calculator New
- Arctan2 Calculator New
- Decimal Degrees to DMS Converter New
- Interactive Unit Circle Visualizer New
- Trigonometric Identities Calculator New