Triangle Calculator

Enter the three side lengths. You get the area by Heron's formula, the angles by the law of cosines, and the triangle's type.

Need the full working for a harder problem? Try the trigonometry step-by-step solver.

The formula

Heron's formula: area = √(s(s − a)(s − b)(s − c)), where s is half the perimeter.

Worked example

A triangular plot has sides of 30 m, 40 m and 50 m. What is its area?

  1. Half the perimeter: s = (30 + 40 + 50) ÷ 2 = 60
  2. s − a = 30, s − b = 20, s − c = 10
  3. Area = √(60 × 30 × 20 × 10) = √360,000 = 600

The plot is 600 m². Since 30² + 40² = 50², it is a right triangle.

How it works

  1. Check it is a triangle

    Each side must be shorter than the other two added together.

  2. Area

    Heron's formula: with s as half the perimeter, the area is √(s(s − a)(s − b)(s − c)).

  3. Angles

    The law of cosines gives each angle from the three sides: cos A = (b² + c² − a²) / 2bc.

Good to know

Common questions

Why does it say my sides don't make a triangle?

If one side is as long as or longer than the other two combined, the sides can't meet to close the shape.

How is the type decided?

By sides: equilateral, isosceles or scalene. By angles: acute, right or obtuse, from the largest angle.

What if I know two sides and the angle between them?

The area is ½ × a × b × sin(C), and the third side comes from the law of cosines. The trigonometry solver works through this with steps.

How do I find a triangle's height?

Rearrange the area formula: height = 2 × area ÷ base. For the plot above, the height onto the 50 m side is 2 × 600 ÷ 50 = 24 m.

Why do two sides and a non-included angle sometimes give two answers?

Because the third side can swing to two positions that both fit. It is known as the ambiguous case, and it is why three sides are the safest input.

More free calculators