Law of Cosines Calculator
Use this law of cosines calculator to determine the third side of a triangle knowing two sides and the angle between them or to find the angles given all three sides.
Solved for side c6.244998
Area15.155445
Perimeter18.244998
Sides5, 7, 6.244998
Angles43.8979°, 76.1021°, 60°
TypeAcute scalene
Inradius1.661326
Circumradius3.605551
Working
| Semi-perimeter s | 9.122499 |
| Area (Heron) | √(s(s−a)(s−b)(s−c)) = 15.155445 |
| Height on side a | 2 × area ÷ a = 6.062178 |
| Inradius | area ÷ s = 1.661326 |
| Circumradius | abc ÷ 4·area = 3.605551 |
| Angle sum | 180° (always 180°) |
The formula
c² = a² + b² − 2ab·cos C
Pythagoras generalised
When C is 90°, cos C is zero and the formula collapses to c² = a² + b². The −2ab·cos C term is the correction for a non-right angle: negative cosine (obtuse C) makes c longer, positive cosine (acute C) makes it shorter.
Unlike the law of sines, the law of cosines has no ambiguous case — arccos returns a unique angle from 0° to 180°.