← All guides

Solve any triangle from its three sides

Find all three angles and the area of a triangle when you only know its sides, using the law of cosines and Heron's formula.

If you know all three sides of a triangle, you can find everything else: every angle, the area and the perimeter. Two formulas do all the work. As an example we will use the triangle with sides a = 5, b = 6 and c = 7.

First, check that the triangle exists

Each side must be shorter than the other two added together. 5 + 6 > 7, 5 + 7 > 6 and 6 + 7 > 5, so this triangle exists. Sides 2, 3 and 6 would not form a triangle.

Angles: the law of cosines

The angle γ opposite side c is:

cos γ = (a² + b² − c²) / 2ab

cos γ = (25 + 36 − 49) / 60 = 0.2, so γ ≈ 78.46°.

In the same way, for the angle α opposite a: cos α = (b² + c² − a²) / 2bc = 60 / 84, so α ≈ 44.42°.

The last angle comes from the angle sum: β = 180° − 78.46° − 44.42° ≈ 57.12°. You can check it with the law of cosines: cos β = 38 / 70, which gives the same angle.

Make sure your calculator is in degree mode for this step, or the inverse cosine will be returned in radians.

Area: Heron's formula

Take the semi-perimeter s = (a + b + c) / 2 = 9. Then:

Area = √(s(s − a)(s − b)(s − c))

Area = √(9 · 4 · 3 · 2) = √216 ≈ 14.70 square units.

Quick checks

  • The largest angle is always opposite the longest side: here γ, opposite c = 7.
  • If a² + b² = c², the triangle is right-angled. For 3, 4, 5, γ is exactly 90°.
  • The three angles must add up to 180°.
Try it in Andulator

Shapes → Triangle · 3 sides

  1. Open Shapes and choose Triangle · 3 sides.
  2. Enter sides a, b and c.
  3. Tap Calculate to get the angles and area, with a diagram.
Keep reading