Law of Cosines Calculator: Find the Third Side (SAS) or the Angles (SSS)

Choose SAS (two sides and the angle between them) or SSS (three sides). You get the missing side or angles, the area by Heron’s formula and a drawing.

Third side c

8.185353

Acute triangle
Angles
A = 47.7837°, B = 72.2163°
Area
27.2798
Show working
  1. c² = a² + b² − 2ab·cos C
  2. c² = 49 + 81 − 2·7·9·cos 60° = 67
  3. c = √67 = 8.185353
  4. cos A = (b² + c² − a²) / 2bc = 0.671932
  5. A = 47.7837°, B = 72.2163°, C = 60°
  6. s = 12.092676, Area = √(s(s−a)(s−b)(s−c)) = 27.2798

How to use

  1. Pick SAS or SSS.
  2. Enter the sides (and the included angle C for SAS).
  3. Read the result, triangle type and area.

Good to know

Cosine rule: c² = a² + b² − 2ab·cos C. With C = 90° it becomes Pythagoras, c² = a² + b². Rearranged, cos C = (a² + b² − c²) / 2ab gives an angle from three sides.

SSS needs the triangle inequality: each side must be shorter than the other two added together. If not, no triangle exists and the calculator says so.

The largest angle tells the type: under 90° acute, exactly 90° right-angled, over 90° obtuse. Area is found with Heron’s formula √(s(s−a)(s−b)(s−c)), s = half the perimeter.

Questions

When do I use the law of cosines?

When you know two sides and the angle between them (SAS), or all three sides (SSS). Otherwise use the law of sines.

What is the third side if a = 7, b = 9 and C = 60°?

c² = 49 + 81 − 2·7·9·0.5 = 67, so c = √67 ≈ 8.185.

Is the 3-4-5 triangle right-angled?

Yes. cos C = (9 + 16 − 25)/24 = 0, so C = 90°.

Which units should I use?

Any one unit for all sides; the area comes out in that unit squared.

Is my data stored or sent anywhere?

No. The calculation runs entirely in your browser; nothing you type leaves your device.

Last updated: