Cosine Rule Formula Solver with Worked Examples

The cosine rule finds a side from two sides and the angle between them. Use the calculator to find the side or the angle .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Give every value except the one you want, or write the letter with a question mark, for example b=5, c=8, A=60 or a=7, b=5, c=8. Every answer is checked by putting it back into the formula.

  • : side opposite angle A
  • : second side
  • : third side
  • : angle opposite side a ()

Before you start

This page is easier if you are comfortable with:

What Cosine rule means

The cosine rule works for any triangle, not just right-angled ones. When , and it becomes Pythagoras’ theorem.

Use it when you know two sides and the angle between them (SAS), or all three sides (SSS).

Here is the side opposite angle , and and are the other two sides. Rearranged it gives the cosine rule for an angle, it pairs with the sine rule, and the area follows from the area of a triangle.

This page is part of Sine rule and cosine rule in Trigonometry. Topics that work alongside it: Cosine rule for an angle, Sine rule, Area of a triangle (½ab sin C), Finding a side with trigonometry, Cosine in a right-angled triangle and Finding an angle with inverse trigonometry.

What is it used for?

The cosine rule, a² = b² + c² − 2bc cos A, finds a side of any triangle when you know two sides and the angle between them.

How to use the cosine rule formula

  1. Label the triangle: is opposite .
  2. Substitute the known values.
  3. Calculate , then take the square root.
  4. To find an angle, rearrange to make the subject.

Diagram

BCA

The side a is opposite angle A. The rule is a generalisation of Pythagoras: if A = 90°, cos A = 0.

Worked examples

Each example below was worked out by the solver on this page and checked by substituting the answer back into the formula.

Example 1: find a side (SAS)

In a triangle, cm, cm and the angle between them is 60°. Find .

Cosine rule Answer checked
Answer
a=7a=7
  1. The formula
    Cosine rule. In this formula is the side opposite angle A, is the second side, is the third side, is the angle opposite side a.
  2. What we know and what we want
    We know and we want to find , the side opposite angle A.
  3. Substitute the numbers
  4. Calculate
  5. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Example 2: find an angle (SSS)

A triangle has sides 7 cm, 5 cm and 8 cm. Find the angle opposite the 7 cm side.

Cosine rule Answer checked
Answer
A=60 °A=60\ \text{°}
  1. The formula
    Cosine rule. In this formula is the side opposite angle A, is the second side, is the third side, is the angle opposite side a.
  2. What we know and what we want
    We know and we want to find , the angle opposite side a.
  3. Rearrange for
    Rearrange to make cos A the subject, then use the inverse cosine.
  4. Substitute the numbers
  5. Calculate
  6. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Example 3: an isosceles case

Two sides of length 10 cm meet at 60°. Find the third side.

Cosine rule Answer checked
Answer
a=10a=10
  1. The formula
    Cosine rule. In this formula is the side opposite angle A, is the second side, is the third side, is the angle opposite side a.
  2. What we know and what we want
    We know and we want to find , the side opposite angle A.
  3. Substitute the numbers
  4. Calculate
  5. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

Finding a side (SAS)

b = 5, c = 8, A = 60°: a = 7

a² = b² + c² − 2bc cos A.

An isosceles case

b = c = 10, A = 60°: a = 10

An equilateral triangle.

An obtuse angle

b = 6, c = 9, A = 110°: a ≈ 12.41

cos of an obtuse angle is negative.

A right angle

A = 90°: a² = b² + c²

The cosine rule reduces to Pythagoras.

Word problems

Use a² = b² + c² − 2bc cos A to find a side when you know two sides and the angle between them.

Finding a side

In a triangle b = 5, c = 8 and A = 60°. Find a.

  1. Substitutea² = 25 + 64 − 2 × 5 × 8 × cos 60°
  2. Calculatea² = 89 − 40 = 49
  3. Roota = 7
  4. Check: a is between 3 and 13 ✓a = 7.

An isosceles case

b = c = 10 and A = 60°. Find a.

  1. Substitutea² = 100 + 100 − 200 × 0.5
  2. Calculatea² = 100
  3. Roota = 10
  4. Check: equilateral ✓a = 10.

An obtuse angle Higher

b = 6, c = 9 and A = 110°. Find a to 2 decimal places.

  1. Substitutea² = 36 + 81 − 108 × cos 110°
  2. cos 110°−0.3420
  3. Calculatea² = 117 + 36.94 = 153.94
  4. Roota = 12.41
  5. Check: longer than b and c ✓a = 12.41.

Using the answer Higher

In a triangle b = 5, c = 8, a = 7. Show that A = 60°.

  1. Rearrangecos A = (b² + c² − a²) ÷ 2bc
  2. Substitute(25 + 64 − 49) ÷ 80 = 0.5
  3. InverseA = 60°
  4. Check: cos 60° = 0.5 ✓A = 60°.

Common mistakes

Forgetting the 2

a² = 25 + 64 − 5 × 8 × cos 60° = 69 ✗

a² = 25 + 64 − 2 × 5 × 8 × cos 60° = 49 ✓

The formula has 2bc.

Not taking the square root

a = 49 ✗

a = √49 = 7 ✓

The formula gives a².

Using Pythagoras only

a = √(25 + 64) = 9.43 ✗

subtract 2bc cos A ✓

The triangle is not right-angled.

Wrong order of operations

(25 + 64 − 80) × cos 60° ✗

25 + 64 − (80 × cos 60°) ✓

Multiply 2bc by cos A first.

Exam tips

  1. a² = b² + c² − 2bc cos A.
  2. A is opposite a, between b and c.
  3. Degree mode.
  4. Multiply 2bc cos A before subtracting.
  5. Square root at the end.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. b = 3, c = 4, A = 90°. Find a Foundation

5

2. b = 6, c = 6, A = 60°. Find a Foundation

6

3. b = 5, c = 12, A = 90°. Find a Foundation

13

4. b = 7, c = 10, A = 50°. Find a to 2 decimal places Higher

7.68

5. b = 8, c = 11, A = 120°. Find a to 2 decimal places Higher

16.52

6. b = 9, c = 4, A = 35°. Find a to 2 decimal places Higher

6.17

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Cosine rule
a² = b² + c² − 2bc cos A.
SAS
Two sides and the included angle.
SSS
All three sides.
Included angle
The angle between the two known sides.
Obtuse
An angle between 90° and 180°.
Pythagoras
The special case at 90°.

Frequently asked questions

When do I use the cosine rule?

With SAS or SSS.

What is the formula?

a² = b² + c² − 2bc cos A.

What happens at 90°?

cos 90° = 0 so it becomes Pythagoras.

Can the angle be obtuse?

Yes, cos A is then negative.

Which page finds the angle?

cosine rule for an angle.

Which page covers the sine rule?

sine rule.

More in Trigonometry and the formula sheets.