Education Tools
Law of Cosines Calculator
Law of Cosines Calculator is part of Toolspire and is ready as soon as this page loads. cos C = (a² + b² − c²) / (2ab). The angle is the inverse cosine, in degrees. Sides that cannot form a triangle are rejected.
On this page
What you can do here
The angle sits opposite c
If you want the angle opposite 3, put 3 in the c box and shift the other sides.
90 degrees is the check
A 3-4-5 triangle is right-angled opposite the longest side. Pythagoras is the special case where c² = a² + b².
Degrees, labelled
The radians page is separate. This inverse cosine is converted with 180/π.
The sequence
How to use the Law of Cosines Calculator
- 1
Put the side opposite the unknown angle in c
The formula solves for that angle only.
- 2
Confirm 90 on 3, 4, 5
If you get 53 or 37, c is not the side of length 5.
- 3
Refuse a triangle that does not close
The page will not invent an angle whose cosine is outside −1 to 1.
Worth knowing
- Law of Cosines Calculator on Toolspire: cos C = (a² + b² − c²) / (2ab), and C is opposite side c.
- For 3, 4, 5, cos C = 0, so C is 90 degrees.
- The angle is reported in degrees, not radians.
- Sides that break the triangle inequality are rejected. 1, 1, 3 do not meet.
Pythagoras is the right-angled case
When c² equals a² + b², the numerator of the cosine is zero, so the angle is 90 degrees. That is why 3-4-5 reports a right angle opposite 5. For any other triangle the same identity still solves the angle, including obtuse angles where c² is larger than a² + b² and the cosine is negative. Heron’s formula would give the area from the same three sides and would not name the angle.
FAQ
Questions about Law of Cosines Calculator
Where does Law of Cosines Calculator run?
What angle is opposite 5 in a 3-4-5 triangle?
What if I put 5 in the a box instead?
Are the units degrees?
Why was my triangle rejected?
Keep going
Related tools
Last updated Report a problem or suggest a feature