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.

Your figures

Example result — edit the figures to make it yours

90

Angle C

Angle A36.87 °
Angle B53.13 °

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

C = arccos((a² + b² − c²) ÷ (2ab))

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

Quick reference — varying side a
Side aAngle C
1.5124.23
2.499.72
390.00
3.7580.28
4.571.79
655.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.