Cosine Rule Calculator
Find a missing side or angle in any triangle using the cosine rule — complete step-by-step working shown.
Corners = Angles A, B, C • Opposite edges = Side A, Side B, Side C
Try these examples
a² = b² + c² − 2bc·cos(A)
Finds: side a (edge opposite Angle A)
Try these examples
cos(A) = (b² + c² − a²) ÷ (2bc)
Finds: angles A, B and C
Step-by-step solution
Select a tab, enter values and press Calculate to see full working.
Cosine Rule Formulas
Cosine Rule Calculator Explained
Core concepts, classroom applications, and plain-English explanations for all audiences.
When would you actually use this?
A surveyor needs to find the distance between two points on the far sides of a field. They can measure two sides and the angle between them — then use the cosine rule to calculate the third side without crossing the field. Engineers use the same technique for structural trusses and bridge spans.
Worked example
"Two roads leave a junction. Road A is 7 km, Road B is 5 km, and the angle between them is 60°. How far apart are the far ends?"
c² = a² + b² − 2ab·cos(C)
c² = 49 + 25 − 2(7)(5)·cos(60°)
c² = 74 − 70 × 0.5 = 74 − 35 = 39
c = √39 = 6.24 km
Pythagoras is the special case when C = 90° (cos 90° = 0, so the middle term vanishes).
Two forms of the rule
- → Finding a side: c² = a² + b² − 2ab·cos(C) — use when you know two sides and the included angle.
- → Finding an angle: cos(C) = (a² + b² − c²) / 2ab — rearranged to find the angle when all three sides are known.
Which rule?
Use the cosine rule when you have two sides and the angle between them, or all three sides. For two angles and a side, use the sine rule instead.
Understanding the Cosine Rule
When to use the cosine rule
Use when you know: (1) two sides and the INCLUDED angle between them (SAS) to find the third side, or (2) all three sides (SSS) to find any angle. If you know two sides and a non-included angle, use the sine rule instead.
Connection to Pythagoras
When A = 90°, cos(A) = 0, so the cosine rule simplifies to a² = b² + c² — exactly Pythagoras! The cosine rule is the universal generalisation for any triangle.
Obtuse angles
cos(A) is negative when A > 90°. This makes −2bc·cos(A) positive, so a² > b² + c² for obtuse triangles. The formula handles this automatically.