Skip to content

Cosine rule calculator with working

Free TutorAura tool · no sign-up · Updated

The cosine rule works in any triangle. Use it to find a side when you know the other two sides and the angle between them, or to find an angle when you know all three sides:

a2=b2+c2−2bccos⁡Acos⁡A=b2+c2−a22bca^2 = b^2 + c^2 - 2bc\cos A \qquad\qquad \cos A = \frac{b^2 + c^2 - a^2}{2bc}

Side aa is opposite angle AA; sides bb and cc are the two that meet at AA.

Loading the tool

Worked examples

  • Missing side: b=5b = 5, c=7c = 7, A=60°A = 60°. a2=25+49−2×5×7×cos⁡60°=74−35=39a^2 = 25 + 49 - 2 \times 5 \times 7 \times \cos 60° = 74 - 35 = 39, so a=39≈6.24a = \sqrt{39} \approx 6.24.
  • Missing angle: a=7a = 7, b=5b = 5, c=8c = 8. cos⁡A=25+64−4980=0.5\cos A = \dfrac{25 + 64 - 49}{80} = 0.5, so A=60°A = 60°.

Order of operations matters

Work out 2bccos⁡A2bc\cos A as one product and subtract it from b2+c2b^2 + c^2. A common error is calculating (b2+c2−2bc)×cos⁡A(b^2 + c^2 - 2bc) \times \cos A, which gives a completely different number. Type it carefully into your calculator, or use brackets.

Obtuse angles

If cos⁡A\cos A comes out negative, the angle is obtuse (more than 90°): cos⁡−1\cos^{-1} handles that automatically. Unlike the sine rule, the cosine rule never gives an ambiguous answer, so it's the safer choice for finding the largest angle of a triangle.

Area of a triangle

Once you have two sides and the angle between them, the area is 12absin⁡C\tfrac{1}{2}ab\sin C. For the first example, the area is 12×5×7×sin⁡60°≈15.16\tfrac{1}{2} \times 5 \times 7 \times \sin 60° \approx 15.16 square units.

Common mistakes

  • Using an angle that isn't between the two known sides.
  • Forgetting to square-root at the end when finding a side.
  • Calculator in radians.

Practise with our cosine rule questions, and use the sine rule calculator when you have a side-angle pair.

Exam tips

  • Label the triangle so the angle you know (or want) is AA.
  • Write a2=…a^2 = \dots with the numbers in, then the value of a2a^2, then aa.
  • The cosine rule is Higher tier at GCSE and Extended tier at IGCSE.

Worked example: a triangle of paths

Two paths leave a gate at an angle of 110°. One is 300 m long and the other 450 m. How far apart are their ends?

a2=3002+4502−2×300×450×cos⁡110°=90000+202500+92345=384845a^2 = 300^2 + 450^2 - 2 \times 300 \times 450 \times \cos 110° = 90000 + 202500 + 92345 = 384845, so a≈620a \approx 620 m.

Because the angle is obtuse, cos⁡110°\cos 110° is negative, so the last term is added. That's why the distance is longer than you might expect: an obtuse angle pushes the ends further apart.

Choosing the rule: if you can see a side with its opposite angle, use the sine rule; if the known angle is between the two known sides, or you know all three sides, use the cosine rule.

Frequently asked questions

What is the cosine rule?

a² = b² + c² − 2bc cos A, linking three sides of a triangle and the angle opposite one of them.

When do you use the cosine rule?

When you know two sides and the angle between them (to find the third side), or all three sides (to find an angle).

How do you find an angle with the cosine rule?

Rearrange to cos A = (b² + c² − a²) ÷ 2bc, then use cos⁻¹.

Is anything I type sent to a server?

No. The calculation runs in your browser and nothing is stored.

Sources

  1. GCSE mathematics: subject content and assessment objectives. Department for Education.
  2. Cambridge IGCSE Mathematics 0580 syllabus. Cambridge International.