Plan your future with our Retirement Budget Calculator

Law of Cosines Calculator

Enter two side lengths and the included angle to calculate the opposite side, all angles, perimeter, area, and triangle type.
Loading...
Luis GonzalezCreated by Luis GonzalezLast updated:

How to Use This Calculator

  1. 1

    Enter Length of Side a

    Input the length of the first known side that forms the included angle.

  2. 2

    Enter Length of Side b

    Input the length of the second known side that forms the included angle.

  3. 3

    Input Included Angle C

    Enter the measure of the angle (in degrees) that is situated between sides 'a' and 'b'. This angle must be between 0° and 180°.

  4. 4

    Review Unknown Side and Angles

    The calculator will instantly solve for the unknown side 'c', the two remaining angles (A and B), the triangle's perimeter, and its area.

Example Calculation

A carpenter needs to cut a triangular piece of wood and knows two side lengths and the angle between them.

Side a

8

Side b

11

Included Angle C (°)

50

Results

8.4776

Tips

Verify Triangle Inequality

While the Law of Cosines will always produce a valid side 'c' given two sides and an included angle, ensure that 'a + b > c', 'a + c > b', and 'b + c > a' if you're working backwards or with derived values. This fundamental geometric principle ensures a valid triangle can be formed.

Angle C Range

The included angle C must be strictly between 0° and 180°. If C is 0° or 180°, the 'triangle' degenerates into a line segment, and a proper triangle cannot be formed, leading to invalid results for area and interior angles.

Precision for Angles

When using the Law of Cosines to find unknown angles (after finding side c), slight rounding errors in side 'c' can propagate. Maintain as much precision as possible in intermediate calculations for side 'c' to ensure the most accurate results for angles A and B.

Solving Triangles with the Law of Cosines Calculator

The Law of Cosines Calculator is a powerful geometric tool for solving oblique triangles, specifically when you know two side lengths and the angle included between them (SAS, Side-Angle-Side). This calculation is vital for fields like engineering, architecture, and navigation, where precise measurements of non-right-angled shapes are common. By inputting the lengths of sides 'a' and 'b' and their included angle 'C', the calculator instantly determines the length of the unknown side 'c' and the measures of the remaining angles 'A' and 'B', along with the triangle's perimeter and area. For example, given sides of 8 and 11 units with an included angle of 50°, the third side 'c' will be approximately 8.4776 units, a practical application in 2025.

Applications of Trigonometric Laws in Geometry

The Law of Cosines is fundamental in geometry because it allows for the complete resolution of any triangle, regardless of whether it contains a right angle. This contrasts with the Pythagorean theorem, which is limited to right triangles. Professionals use the Law of Cosines to determine distances in surveying, calculate forces in structural engineering, or ascertain angles in robotics. For instance, if you know the lengths of three sides of a triangular plot of land, the Law of Cosines can find all its internal angles, crucial for accurate property demarcation and construction planning, especially when the terrain is irregular and angles are not precisely 90 degrees.

Unveiling Unknowns with the Law of Cosines Formula

The Law of Cosines is an algebraic extension of the Pythagorean theorem, adapted for any triangle. It provides a direct method to find the length of the third side when two sides and the included angle are known, or to find an angle when all three sides are known.

The primary formula used by this calculator is:

c^2 = a^2 + b^2 - 2ab × cos(C)

Where:

  • a and b are the lengths of the two known sides.
  • C is the measure of the angle included between sides a and b (in radians for calculation, then converted back to degrees).
  • c is the length of the unknown side opposite angle C.

Once side c is determined, the remaining angles A and B can be found using variations of the same formula (e.g., cos(A) = (b^2 + c^2 - a^2) / (2bc)) or by applying the Law of Sines, followed by the triangle angle sum property (A + B + C = 180°).

💡 If your geometric problem involves ratios and proportions, especially in chemical formulations, our Cosmetic Preservative Percentage Calculator can assist with precise ingredient scaling.

Finding the Third Side and Angles: A Worked Example

Consider a scenario where a landscaper needs to measure a triangular garden plot. They know two sides are 8 feet and 11 feet, and the angle between these two sides is 50°.

  1. Known Sides: Side a = 8, Side b = 11.
  2. Included Angle: Angle C = 50°.

Using the Law of Cosines formula:

c^2 = a^2 + b^2 - 2ab × cos(C) c^2 = 8^2 + 11^2 - (2 × 8 × 11 × cos(50°)) c^2 = 64 + 121 - (176 × 0.6427876) c^2 = 185 - 113.1306 c^2 = 71.8694 c = √71.8694 ≈ 8.4776

Now, to find Angle A using the rearranged formula: cos(A) = (b^2 + c^2 - a^2) / (2bc) cos(A) = (11^2 + 8.4776^2 - 8^2) / (2 × 11 × 8.4776) cos(A) = (121 + 71.8697 - 64) / (186.5072) cos(A) = 128.8697 / 186.5072 ≈ 0.69096 A = arccos(0.69096) ≈ 46.29°

Finally, Angle B: B = 180° - A - C = 180° - 46.29° - 50° = 83.71°

The third side c is approximately 8.4776 units, Angle A is approximately 46.29°, and Angle B is approximately 83.71°.

💡 For other calculations involving proportional changes or reductions, our Cost Reduction Percentage Calculator can help quantify financial efficiency.

Tracing the Origins of the Law of Cosines

The Law of Cosines, also known as the Cosine Rule, has a rich history that predates modern trigonometry. While the current algebraic form is relatively recent, the underlying geometric principles were understood much earlier. The ancient Greek mathematician Euclid, in his Elements (Book II, Propositions 12 and 13), presented theorems that are geometric equivalents of the Law of Cosines for obtuse and acute triangles, respectively, around 300 BC. He didn't use trigonometric functions, but rather related the square of a side to the squares of the other two sides and the rectangle formed by one of those sides and the projection of the other. The formalization with cosine functions came later with Islamic mathematicians in the 10th century, notably Al-Battani, who extended the work to spherical triangles. The modern algebraic notation became prevalent with French mathematician François Viète in the 16th century, solidifying its role as a cornerstone of planar trigonometry.

Frequently Asked Questions

What is the Law of Cosines and when is it used in trigonometry?

The Law of Cosines is a fundamental trigonometric formula that relates the lengths of the sides of a triangle to the cosine of one of its angles. It is used to solve oblique (non-right) triangles when you know two sides and the included angle (SAS case) to find the third side, or when you know all three sides (SSS case) to find any of the angles. It is a generalization of the Pythagorean theorem, reducing to it when the included angle is 90 degrees.

How does the Law of Cosines differ from the Law of Sines?

The Law of Cosines is primarily used when you have information about sides and their included angle (SAS) or all three sides (SSS). It allows you to find an unknown side or angle directly. The Law of Sines, conversely, is used when you have information about two angles and one side (AAS or ASA) or two sides and a non-included angle (SSA, the ambiguous case). Both are essential for solving non-right triangles, but they apply to different sets of known information.

Can the Law of Cosines be applied to right triangles?

Yes, the Law of Cosines can be applied to right triangles, and in fact, it simplifies to the Pythagorean theorem. If the included angle C is 90 degrees, then cos(C) = cos(90°) = 0. The formula c² = a² + b² - 2ab cos(C) becomes c² = a² + b² - 2ab(0), which simplifies to c² = a² + b². This demonstrates that the Pythagorean theorem is a special case of the Law of Cosines, applicable only when one angle is exactly 90 degrees.