Cosine Rule Calculator
Use the cosine rule to find a missing side when you know two sides and the angle between them, or to find an angle when you know all three sides. Full step-by-step working is shown, including obtuse angles.
Find
Angle A must be the angle between sides b and c. Finds side a, opposite A. Rename your triangle to match the diagram.
Missing side
a = 7
How it works
Write the cosine rule
Use this form when you know two sides and the angle between them.
Substitute the values
b = 5, c = 8, A = 60°.
Work out each part
cos 60° = 0.5.
Square root
a = 7 (to 2 decimal places).
Result:a = 7
The cosine rule
Example substitution
Two sides (6 and 9) and the angle between them (40°) give the third side.
Worked examples
Find side a when b = 6 cm, c = 9 cm and A = 40°.
- 1Cosine rule: a² = 6² + 9² − 2 × 6 × 9 × cos 40°
- 2Calculate: a² = 36 + 81 − 82.73 = 34.27
- 3Square root: a = √34.27 = 5.85
A triangle has sides 7 cm, 8 cm and 9 cm. Find the angle opposite the 7 cm side.
- 1Cosine rule for an angle: cos A = (8² + 9² − 7²) ÷ (2 × 8 × 9)
- 2Calculate: cos A = 96 ÷ 144 = 0.6667
- 3Inverse cosine: A = cos⁻¹(0.6667) = 48.2°
Find side a when b = 5 cm, c = 7 cm and A = 120°.
- 1Cosine rule: a² = 5² + 7² − 2 × 5 × 7 × cos 120°
- 2cos 120° = −0.5: a² = 25 + 49 + 35 = 109
- 3Square root: a = √109 = 10.44
Frequently asked questions
What is the cosine rule?+
a² = b² + c² − 2bc cos A. Rearranged to find an angle: cos A = (b² + c² − a²)/(2bc). Side a is always the side opposite angle A.
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). Otherwise use the sine rule.
How do you find an angle using the cosine rule?+
Substitute into cos A = (b² + c² − a²)/(2bc), then use inverse cosine (SHIFT then cos on your calculator). Side a must be opposite the angle you want.
What if the angle is obtuse?+
The cosine of an obtuse angle is negative, so −2bc cos A becomes positive and the missing side is longer. The calculator handles this automatically.
How is the cosine rule related to Pythagoras?+
When A = 90°, cos A = 0 and the cosine rule becomes a² = b² + c², which is Pythagoras’ theorem. The cosine rule is the general version for any triangle.