Law of Cosines Calculator

Find a missing side or angle of any triangle using the law of cosines

Law of Cosines Formula

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

Use when two sides and the included angle are known.

a
b
c
∠C
Enter values and calculate.
Triangle Visualization
A B C
a = BC | b = AC | c = AB

Law of Cosines Calculator – Find Missing Side or Angle of a Triangle

The Law of Cosines Calculator helps you solve any triangle when you know two sides and the included angle or all three sides. It is one of the most important formulas in trigonometry and is widely used in geometry, engineering, navigation, and physics.

This calculator instantly computes the missing side or angle and displays the triangle graph for better visualization.


What is the Law of Cosines?

The Law of Cosines is a mathematical formula that relates the three sides of a triangle to the cosine of one of its angles. It works for all types of triangles, including acute, obtuse, and right triangles.

\(c^2 = a^2 + b^2 - 2ab\cos(C)\)
  • a, b, c = sides of the triangle
  • C = angle opposite side c
  • cos = cosine trigonometric function
Law of Cosines triangle diagram showing sides a b c and angle C with formula c squared equals a squared plus b squared minus 2ab cos C

Law of Cosines Formula Explained

The Law of Cosines formula describes the relationship between the three sides of a triangle and the cosine of one of its angles. It allows you to calculate a missing side or angle when enough information about the triangle is known.

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

In this formula:

The formula works by subtracting the value of 2ab cos(C) from the sum of the squares of sides a and b. The result gives the square of side c. Taking the square root provides the final side length.

Alternative Forms of the Law of Cosines

The formula can also be rearranged to calculate other sides or angles of a triangle:

Find Side a
\(a^2 = b^2 + c^2 - 2bc\cos(A)\)
Find Side b
\(b^2 = a^2 + c^2 - 2ac\cos(B)\)
Find Angle C
\(C = \cos^{-1}\left(\frac{a^2+b^2-c^2}{2ab}\right)\)

These variations allow the Law of Cosines to solve almost any triangle problem when sufficient side or angle information is available.

When to Use the Law of Cosines

The Law of Cosines is used when:


Example: Using the Law of Cosines

Suppose a triangle has the following values:

Step 1: Write the formula
\(c^2 = a^2 + b^2 - 2ab\cos(C)\)
Step 2: Substitute the values
\(c^2 = 8^2 + 11^2 - 2(8)(11)\cos(60^\circ)\)
Step 3: Calculate squares
\(c^2 = 64 + 121 - 176 \times 0.5\)
Step 4: Simplify
\(c^2 = 185 - 88\)
Step 5: Take square root
\(c = \sqrt{97} \approx 9.85\)

Final Result: The missing side is approximately 9.85 units.


How to Use the Law of Cosines Calculator

Method 1: Find a Missing Side
  1. Enter side a
  2. Enter side b
  3. Enter angle C
  4. Click Solve Side
Method 2: Find a Missing Angle
  1. Enter side a
  2. Enter side b
  3. Enter side c
  4. Click Solve Angle

Law of Cosines vs Pythagorean Theorem

Feature Law of Cosines Pythagorean Theorem
Works for all triangles Yes No
Works for right triangles Yes Yes
Uses trigonometry Yes No
Formula \(c^2 = a^2 + b^2 - 2ab\cos C\) \(a^2 + b^2 = c^2\)

Applications of the Law of Cosines

Navigation

Used to calculate distances between locations on maps.

Engineering

Helps determine angles and structural dimensions.

Surveying

Used in land measurement and mapping.

Physics

Used to calculate forces, vectors, and distances.


FAQ on Law of Cosines Calculator

1. What is the Law of Cosines used for?

The Law of Cosines is used to calculate the missing side or angle of a triangle when two sides and the included angle or all three sides are known.

2. Is the Law of Cosines the same as the Pythagorean theorem?

No. The Law of Cosines works for all triangles, while the Pythagorean theorem works only for right triangles.

3. Can the Law of Cosines find angles?

Yes. If all three sides are known, the Law of Cosines can be rearranged to calculate an angle using inverse cosine.

Other Triangle Calculators