Home · Math · Trigonometry · Law of Cosines Calculator
Law of Cosines Calculator
All three angles of a triangle from its three sides, using the law of cosines rearranged for each angle.
What this calculator does
All three angles of a triangle from its three sides, using the law of cosines rearranged for each angle. Every figure on this page is computed from the formula or definition stated below, with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
The law of cosines relates each angle to the side opposite it: cos C = (a² + b² − c²) / (2ab). Angles are returned in degrees and always sum to 180 for a valid triangle; the sides must satisfy the triangle inequality.
All angles are entered and returned in degrees.
Side lengths may use any consistent unit; areas use the square of that unit.
Worked example
With the example inputs this page opens with (side a 3, side b 4, side c 5), the result is 90.00 — angle c. Change any figure and the result updates with the same formula.
Quick reference
| Side a | Angle C |
|---|---|
| 1.5 | 124.23 |
| 2.4 | 99.72 |
| 3 | 90.00 |
| 3.75 | 80.28 |
| 4.5 | 71.79 |
| 6 | 55.77 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
How does the Law of Cosines Calculator work?
All three angles of a triangle from its three sides, using the law of cosines rearranged for each angle. Sides a, b, c → Angle C, angle A, angle B. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Law of Cosines Calculator need?
Sides a, b, c → Angle C, angle A, angle B. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Law of Cosines Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.