Skip to content

Triangle Calculator

Enter any three sides or angles, including at least one side, and the calculator finds everything else, explains the method and draws the triangle to scale.

MathUpdated Free · No sign-up

How to use the Triangle Calculator

  1. Choose Angle unit.
  2. Add any optional details you have; leave the rest blank.
  3. Read your answer in the results panel. It updates as you type, and the breakdown, step-by-step working and any charts or tables appear below it.
  4. Use Share link to save or send the exact calculation, or Copy to paste the results elsewhere.

Which three values do you need?

A triangle is fixed by three measurements as long as at least one of them is a side. Three angles alone fix only the shape, because a small triangle and a large one can have the same angles. The calculator recognises the combination you give it:

  • SSS: three sides. The law of cosines gives each angle.
  • SAS: two sides and the angle between them. The law of cosines gives the third side.
  • ASA or AAS: two angles and a side. The third angle is 180° minus the other two, and the law of sines gives the remaining sides.
  • SSA: two sides and an angle that is not between them. This is the ambiguous case described below.

The two laws

Law of cosines: c² = a² + b² − 2ab·cos C

Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C

Side a is always opposite angle A, b opposite B and c opposite C. Worked example (SSS) with a = 5, b = 7 and c = 8: cos B = (a² + c² − b²) ÷ (2ac) = (25 + 64 − 49) ÷ 80 = 0.5, so B = 60°. In the same way A ≈ 38.21° and C ≈ 81.79°. The area is ½ × a × c × sin B = ½ × 5 × 8 × 0.866 ≈ 17.32.

The ambiguous SSA case

With two sides and a non-included angle there can be zero, one or two triangles. Take A = 30°, a = 6 and b = 10. The law of sines gives sin B = 10 × sin 30° ÷ 6 ≈ 0.833. Two angles have that sine: B ≈ 56.44° and B ≈ 123.56°. Both leave room for a positive third angle, so two different triangles fit the data, and the calculator shows both side by side. If the computed sine is above 1, side a is too short to reach the third side and no triangle exists.

Everything else it reports

Quantity Formula
Area ½ab·sin C, or Heron’s formula √(s(s−a)(s−b)(s−c))
Height to side a hₐ = 2 × Area ÷ a
Median to side a mₐ = ½√(2b² + 2c² − a²)
Inradius r = Area ÷ s, where s is half the perimeter
Circumradius R = a ÷ (2 sin A)

Tip: angles can be entered in degrees or radians. If your numbers come from a drawing, small measuring errors can make SSS data impossible; the two shorter sides must add up to more than the longest one.

Frequently asked questions

Can I solve a triangle with only three angles?

No. Three angles describe the shape but not the size, so infinitely many triangles match. Enter at least one side length.

Why does the calculator show two triangles?

You entered two sides and an angle that is not between them (SSA). Sometimes two different triangles fit those values, so both are shown. This is called the ambiguous case.

When should I use the law of sines and when the law of cosines?

Use the law of cosines when you know three sides, or two sides and the angle between them. Use the law of sines when you know a side and its opposite angle plus one more value.

How do I check whether three lengths can form a triangle?

Add the two shorter lengths. If the sum is greater than the longest length, a triangle exists. Otherwise it does not; for example 1, 2 and 5 cannot form one.