The Law of Cosines

The Law of Cosines is a way to Solve a triangle. It is typically used for any triangles that are not right triangles.
(For right triangles use SOH-CAH-TOA and The Pythagorean Theorem: a2 + b2 = c2.)

The Law of Cosines is used depending upon what informtion you are given about your triangle's side lengths and angle measures.

Use The Law of Cosines when you are given:
Two side lengths of the triangle and the angle between the two sides

The formula for The Law of Cosines
cosine formula

Similar to the Law of Sines,
we can re-write the formula for the Law of Cosines.
We can solve the formula using Algebra for each side length and for each angle measure, as shown below.
cosine cosine

The two sets of formulas above are the quickest way to solve for the unknown measurements of your triangle.
Be careful to correctly identify the angle in use.

Enter in the values that you were given for your triangle.
Then click the submit button for the remaining solutions.

Side a = Side b = Side c = Angle (°) =


Example 1: Solve for c:
ex1 ex1


Example 2: Solve for b:
ex2 ex2

To solve for the angle degrees, it is easiest to use the Law of Sines