Triangle Calculator

Enter three sides of any triangle to get its angles, area (Heron’s formula), perimeter and type.

Area
14.696938
Angles (they add up to 180°)°
020406080A — Angle: 44.415 °AB — Angle: 57.122 °BC — Angle: 78.463 °C
Angle A (opposite a)
44.4153
Angle B (opposite b)
57.1217
Angle C (opposite c)
78.463
Perimeter
18
Triangle type
Scalene, acute
Show the working
  1. Semi-perimeter s = (a + b + c) ÷ 2 = (5 + 6 + 7) ÷ 2 = 9
  2. Heron: Area = √(s(s − a)(s − b)(s − c)) = √(9 × 4 × 3 × 2) = 14.696938
  3. Law of cosines: cos A = (b² + c² − a²) ÷ 2bc = 0.71428571 → A = 44.4153°
  4. cos B = (a² + c² − b²) ÷ 2ac = 0.54285714 → B = 57.1217°
  5. C = 180° − A − B = 78.463°

Runs entirely in your browser. Nothing you enter is uploaded.

Formula

s = (a + b + c) ÷ 2Area = √(s(s − a)(s − b)(s − c)) (Heron’s formula)cos A = (b² + c² − a²) ÷ 2bc (law of cosines)

How it works

Three side lengths fix a triangle completely, so you can work out everything else about it. Heron’s formula gives the area directly from the sides, with no need to find a height first: compute the semi-perimeter s, multiply s by its differences from each side, and take the square root.

The angles come from the law of cosines, a generalisation of the Pythagorean theorem that works for any triangle. Once two angles are known, the third is whatever is left of 180°.

Not every set of three lengths makes a triangle. The triangle inequality says each side must be shorter than the sum of the other two; 2, 3 and 6 fail because 2 + 3 < 6, so the short sides can’t meet.

Frequently asked questions

How can I tell if a triangle is right-angled from its sides?

Check whether the squares of the two shorter sides add up to the square of the longest. If a² + b² = c², the angle opposite c is exactly 90°. If the sum is smaller, the triangle is obtuse; if larger, acute.

What if I know two sides and an angle instead?

Use the law of cosines to find the third side first (c² = a² + b² − 2ab·cos C), then enter all three sides here.

esc