Skip to main content
Calkulon
Back to Guides
3 min read6 Steps

How to Use the Law of Cosines: Step-by-Step Guide

Solve any triangle with the law of cosines

Skip the math — use the calculator

Step-by-Step Instructions

1

Gather Your Inputs

First, identify the lengths of two sides of the triangle and the angle between them. Make sure to note the units of measurement for the sides and the angle.

2

Write Down the Law of Cosines Formula

The Law of Cosines formula is: c² = a² + b² - 2ab * cos(C), where c is the length of the side opposite angle C, and a and b are the lengths of the other two sides.

3

Plug in the Values

Plug the values of a, b, and angle C into the formula. Make sure to square the values of a and b.

4

Calculate the Cosine of the Angle

Use a calculator or a trigonometry table to find the cosine of angle C.

5

Solve for the Unknown Side

Solve the equation for c², then take the square root of both sides to find the length of the unknown side.

6

Check Your Answer

Check your answer by plugging it back into the formula to make sure it satisfies the equation. You can also use a calculator to find the length of the unknown side and compare it to your answer.

The Law of Cosines is a fundamental concept in trigonometry that allows you to find the length of the third side of a triangle when you know the lengths of two sides and the angle between them. In this guide, we will walk you through the steps to use the Law of Cosines to solve any triangle.

Introduction to the Law of Cosines

The Law of Cosines formula is: c² = a² + b² - 2ab * cos(C), where c is the length of the side opposite angle C, and a and b are the lengths of the other two sides.

Using the Law of Cosines

To use the Law of Cosines, you need to know the lengths of two sides and the angle between them. You can then plug these values into the formula to find the length of the third side.

Worked Example

Let's say we have a triangle with sides of length 5 and 7, and the angle between them is 60 degrees. We can use the Law of Cosines to find the length of the third side.

c² = 5² + 7² - 2 * 5 * 7 * cos(60) c² = 25 + 49 - 70 * 0.5 c² = 74 - 35 c² = 39 c = √39 ≈ 6.24

So, the length of the third side is approximately 6.24.

Common Mistakes to Avoid

One common mistake to avoid when using the Law of Cosines is to forget to square the lengths of the sides. Make sure to square the values of a and b before plugging them into the formula.

Another mistake to avoid is to use the wrong angle. Make sure to use the angle between the two known sides, not one of the other angles in the triangle.

When to Use a Calculator

While it's possible to calculate the Law of Cosines by hand, it's often more convenient to use a calculator, especially when dealing with large numbers or complex angles. Most calculators have a built-in cos function that you can use to find the cosine of an angle.

Conclusion

The Law of Cosines is a powerful tool for solving triangles. By following these steps and using the formula, you can find the length of the third side of a triangle when you know the lengths of two sides and the angle between them. Remember to square the lengths of the sides, use the correct angle, and consider using a calculator for convenience.

Ready to Calculate?

Skip the manual work and get instant results.

Open Calculator

Settings

PrivacyTermsAbout© 2026 Calkulon