Skip to content

Law of Cosines Calculator

Solve triangles with two sides and an angle.

Reviewed by the Calculation Machine team · How we check our maths

Your values

ⓘ Live results

Results
Side c
6.66634
Angle A
46.237°
Angle B
96.763°
Area
26.47986
Perimeter
25.66634

Quick answer

The law of cosines generalises Pythagoras: c² = a² + b² − 2ab·cos C.

The formula

c² = a² + b² − 2ab cos C

Worked example

Worked example

Using the values the calculator loads with.

Inputs

  • Side a8
  • Side b11
  • Included angle C37 degrees

Result

  • Side c6.66634
  • Angle A46.237°
  • Angle B96.763°
  • Area26.47986
  • Perimeter25.66634

How to use the Law of Cosines Calculator

  1. 1Enter the two known sides.
  2. 2Enter the angle between them in degrees.
  3. 3Read the missing side and angles.

Frequently asked questions

When do I use cosine vs sine rule?

Cosine rule for two sides and the included angle, or three sides; sine rule otherwise.

Does it work for right triangles?

Yes — with C = 90° it reduces to Pythagoras.

About this calculator