Toolvito

Works on this device

Triangle Solver

Enter what you know about a triangle and get the rest: every side and angle, the area, the perimeter, the heights and more. The page also tells you when no triangle fits your numbers, and why.

Enter your values

Use this when you know the lengths of all three sides.

Your values

More options

With a unit, the area can also be shown in square feet, acres or hectares.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Solve.

How to use this solver

  1. Choose what you know, for example Three sides (SSS) or Right triangle (Pythagorean theorem).
  2. Enter the values. For each angle you can choose degrees, radians or gradians.
  3. Choose Solve. The results show the sides, angles, area, perimeter, heights, medians, angle bisectors, inradius and circumradius.
  4. Open How it was worked out to see the steps with your numbers. You can copy the results, print them, or download a CSV file.
  5. Under More options you can choose a unit for the lengths. The area can then be shown in square feet, square metres, acres or hectares.

How the letters are used

The sides are a, b and c. The angles are A, B and C. Each angle has the same letter as the side opposite it, so angle A is opposite side a.

In a right triangle, C is the right angle, a and b are the legs, and c is the hypotenuse.

The formulas

  • Angle sum: A + B + C = 180° (π radians, 200 gradians).
  • Law of cosines: a² = b² + c² − 2bc × cos A. It finds a side from two sides and the angle between them, or an angle from three sides.
  • Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C. It finds sides when you know two angles and one side.
  • Pythagorean theorem: a² + b² = c² in a right triangle.
  • Area: ½ × base × height, or ½ × a × b × sin C, or Heron's formula √(s(s − a)(s − b)(s − c)) with s = half the perimeter. The steps show two of these so you can see that they agree.
  • Height to a side = 2 × area ÷ that side. Median to side a = ½ × √(2b² + 2c² − a²).
  • Angle bisector from A = 2bc × cos(A ÷ 2) ÷ (b + c).
  • Inradius = area ÷ s. Circumradius = a × b × c ÷ (4 × area).

Two sides and an angle not between them (SSA)

This is the one case that can have more than one answer. Let A be the known angle, a the side opposite it and b the other known side. The height from corner C is h = b × sin A.

  • If a is shorter than h, no triangle exists. The page says so and shows h.
  • If a is equal to h, there is one right triangle.
  • If a is longer than h but shorter than b, two triangles fit. The page shows both.
  • If a is as long as b or longer, there is one triangle.
  • If A is 90° or more, a must be longer than b. Then there is one triangle.

Worked examples

Three sides 5, 6 and 7: half the perimeter is s = 9. The area is √(9 × 4 × 3 × 2) = √216 = 14.6969. The angles are A = 44.4153°, B = 57.1217° and C = 78.463°. The height to side c is 2 × 14.6969 ÷ 7 = 4.19913.

Sides a = 5 and b = 6 with angle A = 40°: the height is 6 × sin 40° = 3.85673. Side a is longer than that and shorter than b, so two triangles fit. One has B = 50.4748° and c = 7.77835. The other has B = 129.525° and c = 1.41418.

Right triangle with legs 3 and 4: c² = 9 + 16 = 25, so c = 5. Angle A = 36.8699° and the area is 6.

A 30-60-90 triangle with short leg 5 has long leg 5√3 = 8.66025 and hypotenuse 10.

Limits you should know

  • Numbers are shown with 6 significant digits. The CSV file keeps 15 digits.
  • Sides you type are compared exactly, so 0.1, 0.2 and 0.3 are seen as a flat line and are rejected. Sides or angles that the page has to work out first are compared with a tolerance of 1 part in a billion.
  • A triangle that is almost flat loses accuracy: a very small change in an input changes the angles and area a lot. The page adds a warning when the smallest angle is below about 0.006°.
  • Angles are entered as decimal numbers. Degrees with minutes and seconds are not supported.
  • This page solves flat (plane) triangles only. It does not solve triangles on a sphere, and it does not write proofs.
  • The page does not draw the triangle.
  • Sides must be numbers. Sides written as expressions with x are not supported.

Related tools