Law of Cosines Calculator
Law of cosines instantly calculates results using a sas, a sss, alpha sss. Use the calculator above for instant answers in your browser.
The Law of Cosines Calculator is an advanced geometrical tool designed to determine unknown side lengths and interior angles for any triangle. Whether you are dealing with a Side-Angle-Side (SAS) scenario or a Side-Side-Side (SSS) setup, this calculator eliminates manual computation errors. Students, engineers, and navigators benefit greatly from its ability to solve non-right triangles quickly and accurately.
How the Law of Cosines Works
The Law of Cosines generalizes the Pythagorean theorem to include all types of triangles, not just right-angled ones. For any triangle with sides labeled $a$, $b$, and $c$, and corresponding opposite angles $\alpha$, $\beta$, and $\gamma$, the fundamental relationship is expressed as $c^2 = a^2 + b^2 - 2ab \cos(\gamma)$. To find a missing side when two sides and the included angle (SAS) are known, we take the square root of the rearranged formula: $c = \sqrt{a^2 + b^2 - 2ab \cos(\gamma)}$. Conversely, if all three sides (SSS) are known, the formula can be rearranged to solve for any angle, such as $\cos(\alpha) = \frac{b^2 + c^2 - a^2}{2bc}$.
Worked Calculation Example
Imagine you have a triangle in a Side-Angle-Side (SAS) configuration where side $a = 7$ units, side $b = 10$ units, and the included angle $\gamma = 60^\circ$. To find the missing side $c$, substitute these values into the Law of Cosines formula. First, square the known sides: $7^2 = 49$ and $10^2 = 100$. Next, calculate the product term: $2 \times 7 \times 10 \times \cos(60^\circ)$. Since $\cos(60^\circ) = 0.5$, this product equals $140 \times 0.5 = 70$. Now, combine the terms: $c^2 = 49 + 100 - 70$, which simplifies to $c^2 = 79$. Finally, take the square root to find $c = \sqrt{79} \approx 8.89$ units.
Practical Tips for Solving Triangles
Always verify your calculator's angle mode setting (degrees versus radians) before starting any trigonometric calculations. When solving for angles using inverse cosine functions, double-check that your side lengths satisfy the triangle inequality theorem—the sum of any two sides must strictly exceed the remaining side. Keep intermediate decimal values unrounded until the final step to maintain high precision in engineering or architectural blueprints.
FAQs
What is the law of cosines?
The law of cosines is a fundamental geometric rule relating the lengths of a triangle's sides to the cosine of one of its angles. It serves as an extension of the Pythagorean theorem, making it universally applicable to acute, obtuse, and right-angled triangles alike.
When should I use the law of cosines vs the Pythagorean theorem?
You should use the Pythagorean theorem exclusively for right triangles where the 90-degree angle is identified. The law of cosines should be utilized when you are working with oblique triangles, meaning triangles that lack a right angle, specifically in Side-Angle-Side or Side-Side-Side situations.
Is the law of cosines valid only for right triangles?
No, the law of cosines is valid for all triangles, including acute and obtuse triangles. In fact, if you apply the law of cosines to a right triangle where the included angle is 90 degrees, the cosine term drops to zero because the cosine of 90 degrees is zero, reducing the formula directly to the standard Pythagorean theorem.
What is the third side of a triangle with sides 5 and 6?
It is impossible to determine a single unique third side with only two side lengths unless the angle between them is also known. By the triangle inequality theorem, the third side can be any real length strictly greater than 1 and strictly less than 11. Once you know the included angle, you can use the law of cosines to find the exact length.
Formula verified against Mathematical standards (ISO 80000-2) — all calculations use deterministic, standards-based formulas.
Related calculators
Remainder
Instantly calculate remainder using dividend, divisor, hidden variables. Free, accurate math calculator with real-world examples.
Math
Slope
Instantly calculate slope using abs b, angle, b. Free, accurate math calculator with real-world examples.
Math
Average
Instantly calculate average using course 1, course 10, course 100. Free, accurate math calculator with real-world examples.
Math
Circumference
Instantly calculate circumference using area, circumference, d. Free, accurate math calculator with real-world examples.
Math
Right triangle side and angle
Instantly calculate right triangle side and angle using a1, a2, a3. Free, accurate math calculator with real-world examples.
Math