Solve Triangles Using the Law of Cosines Calculator


Solve Triangles Using the Law of Cosines Calculator

Instantly find the missing side and angles of any triangle using the Side-Angle-Side (SAS) configuration. This powerful tool applies the Law of Cosines to provide precise results for students, engineers, and hobbyists.


Length of the side adjacent to the known angle.
Please enter a valid positive number.


Length of the other side adjacent to the known angle.
Please enter a valid positive number.


Select the unit of measurement for the sides.


The angle between Side ‘a’ and Side ‘b’. Must be between 0 and 180.
Please enter a valid angle between 0 and 180.


Visual Representation of the Triangle

A B C a b c

A visual approximation of your triangle. Not to scale.

What is the Solve Triangles Using the Law of Cosines Calculator?

The solve triangles using the law of cosines calculator is a specialized tool for solving oblique triangles (triangles without a 90° angle) in a specific scenario. It’s designed for the “Side-Angle-Side” (SAS) case, where you know the lengths of two sides and the measure of the angle between them. Using this information, the calculator applies the Law of Cosines formula to find the length of the unknown third side. Subsequently, it determines the remaining two angles and the triangle’s area. This tool is invaluable for students in trigonometry, surveyors, engineers, and anyone needing to solve for the dimensions of a triangle when direct measurement is not feasible.

The Law of Cosines Formula and Explanation

The Law of Cosines is a fundamental theorem in trigonometry that generalizes the Pythagorean theorem to all triangles. For any given triangle with sides ‘a’, ‘b’, and ‘c’, and angles ‘A’, ‘B’, and ‘C’ opposite those sides, the formula is as follows:

c² = a² + b² – 2ab cos(C)

This version of the formula allows you to calculate the length of side ‘c’ when you know the lengths of sides ‘a’ and ‘b’ and the angle ‘C’ that is included between them.

Variables Table

Description of variables used in the Law of Cosines (SAS case).
Variable Meaning Unit Typical Range
a, b Known lengths of two sides of the triangle. Length (cm, m, in, etc.) Any positive number.
C The known angle included between sides ‘a’ and ‘b’. Degrees Greater than 0 and less than 180.
c The unknown length of the side opposite angle ‘C’. Length (same as a, b) Calculated based on other inputs.
cos(C) The cosine of angle C. Unitless ratio -1 to 1

Practical Examples

Example 1: Acute Angle

Imagine you are surveying a triangular piece of land. You measure two sides to be 100 meters and 120 meters, with an angle of 60 degrees between them.

  • Input – Side ‘a’: 100
  • Input – Side ‘b’: 120
  • Input – Angle ‘C’: 60°
  • Units: Meters (m)
  • Result: Using the solve triangles using the law of cosines calculator, the third side ‘c’ would be calculated as approximately 111.4 meters.

Example 2: Obtuse Angle

Consider an artist designing a triangular sculpture. Two connecting pieces are 5 feet and 8 feet long, and they meet at an angle of 110 degrees.

  • Input – Side ‘a’: 5
  • Input – Side ‘b’: 8
  • Input – Angle ‘C’: 110°
  • Units: Feet (ft)
  • Result: The calculator would determine the length of the third piece needed to complete the triangle is approximately 10.8 feet. An internal link could point to a resource about {related_keywords} for more complex shapes.

How to Use This Solve Triangles Using the Law of Cosines Calculator

  1. Enter Side ‘a’: Input the length of one of the known sides into the “Side ‘a'” field.
  2. Enter Side ‘b’: Input the length of the second known side into the “Side ‘b'” field.
  3. Select Units: Choose the appropriate unit of measurement (e.g., cm, meters, inches) for your sides from the dropdown menu.
  4. Enter Angle ‘C’: Input the angle that is between sides ‘a’ and ‘b’ in degrees. This value must be greater than 0 and less than 180.
  5. Interpret Results: The calculator will automatically update, showing the length of the missing side ‘c’, the measures of the other two angles (‘A’ and ‘B’), and the total area of the triangle. The included {related_keywords} might be useful for further calculations.

Key Factors That Affect the Calculation

  • Magnitude of the Included Angle: An angle less than 90° (acute) will result in a third side that is shorter than if the angle were greater than 90° (obtuse), assuming the side lengths are the same.
  • Ratio of Side Lengths: Highly different side lengths (e.g., a=1, b=100) will create a very skewed triangle with one very small and one very large angle.
  • Unit Consistency: While our calculator handles unit labels, it’s crucial in manual calculations that all side lengths are in the same unit before applying the formula.
  • Angle Being in Degrees: The formula requires the angle to be in degrees for most calculators, but the trigonometric function `cos()` in JavaScript uses radians. Our calculator handles this conversion automatically.
  • Floating Point Precision: Digital calculators have minor precision limitations, which can lead to extremely small rounding differences in the final digits of a calculation.
  • Triangle Inequality Theorem: For any valid triangle, the sum of the lengths of any two sides must be greater than the length of the third side. The Law of Cosines inherently respects this principle. Exploring this might lead you to a {related_keywords}.

Frequently Asked Questions (FAQ)

1. When should I use the Law of Cosines instead of the Law of Sines?

Use the Law of Cosines when you have either Side-Angle-Side (SAS) as in this calculator, or Side-Side-Side (SSS). The Law of Sines is used for Angle-Side-Angle (ASA) or Angle-Angle-Side (AAS) cases. For more details, see our article on {related_keywords}.

2. Can this calculator solve right triangles?

Yes. If you input 90° as the included angle, the Law of Cosines simplifies to the Pythagorean theorem (c² = a² + b²), because cos(90°) is 0. The calculator will work correctly.

3. What happens if my inputs don’t form a triangle?

For the SAS case, any two positive side lengths and an angle between 0 and 180 degrees will always form a valid triangle. The calculator validates for these conditions.

4. Why is the angle limited to 0-180 degrees?

The sum of angles in any triangle is exactly 180 degrees. Therefore, a single angle cannot be 0, 180, or greater, as it wouldn’t leave any degrees for the other two angles.

5. What units can I use?

This calculator provides options for common length units. The specific unit doesn’t change the numerical result, only the label. If you choose “unitless,” the calculation is treated as a pure ratio.

6. How is the area calculated?

Once two sides and the included angle are known, the area is calculated using the formula: Area = 0.5 * a * b * sin(C). Our solve triangles using the law of cosines calculator does this for you automatically.

7. What is an ‘oblique’ triangle?

An oblique triangle is any triangle that does not have a right angle (90°). The Law of Cosines and Law of Sines are specifically for solving these types of triangles.

8. Can I find angles if I know all three sides?

Yes, by rearranging the Law of Cosines formula. For example, to find angle C, you would use: C = arccos((a² + b² – c²) / 2ab). This calculator is optimized for the SAS case, but a different tool could handle SSS. A related {related_keywords} page might have this tool.

Related Tools and Internal Resources

If you found this calculator useful, you may also be interested in our other geometry and trigonometry tools:

  • {related_keywords}: Perfect for when you know two angles and a side (ASA/AAS).
  • Pythagorean Theorem Calculator: For quickly solving right-angled triangles.
  • Area of a Triangle Calculator: A comprehensive tool that provides multiple ways to find a triangle’s area.

© 2026 Your Website. All rights reserved. This solve triangles using the law of cosines calculator is for educational purposes.



Leave a Reply

Your email address will not be published. Required fields are marked *