Maths Help UK

Cosine rule

a² = b² + c² − 2bc cos A. For sides or for an angle when all three sides are known.

Enter values above to calculate.

Higher-tier formula. Use when you have two sides and the included angle (find third side) or all three sides (find any angle). Rearrange for cos A: cos A = (b² + c² − a²) / (2bc).

Worked examples
b = 5, c = 7, A = 60°: a² = 25 + 49 − 70 cos 60 = 39 ⇒ a ≈ 6.24.
a = 7, b = 5, c = 8: cos A = (25 + 64 − 49) / 80 = 0.5 ⇒ A = 60°.
Area = ½ab sin C is a related formula for triangle area when you know two sides and the included angle.

Frequently asked questions

Calculator setup?
DEG mode. Calculate the right-hand side, then square root for sides or arccos for angles.
When does Pythagoras emerge?
When A = 90°, cos A = 0, so a² = b² + c² — the cosine rule reduces to Pythagoras.