Triangle Calculator with Steps

Enter three sides, two sides and the included angle, or two angles and a side. The calculator finds every missing side and angle, the area, perimeter and heights, classifies the triangle and draws it to scale — with Law of Cosines and Law of Sines steps.

Grades 8–11FreeNo sign-up

Try:

How to use the triangle calculator

  1. Choose what you know: SSS (three sides), SAS (two sides and the angle between them), ASA (two angles and the side between them) or AAS (two angles and another side).
  2. Type the three values. Angles are in degrees. Pick a unit for the sides if you have one.
  3. Read the completed table of sides and angles, the area and perimeter, the type of triangle and the numbered steps. The diagram is drawn to scale.

The calculator uses the standard naming: side a is opposite angle A, side b is opposite B and side c is opposite C.

The three tools for solving triangles

RuleFormulaUse it when you know
Angle sumA + B + C = 180°two angles
Law of Cosinesc² = a² + b² − 2ab·cos Cthree sides, or two sides and the included angle
Law of Sinesa ÷ sin A = b ÷ sin B = c ÷ sin Ca side and its opposite angle, plus one more part

The Law of Cosines is the Pythagorean theorem with a correction term: when C = 90°, cos C = 0 and it becomes c² = a² + b².

Worked example: SSS

Sides a = 5, b = 6, c = 7.
cos A = (6² + 7² − 5²) ÷ (2 × 6 × 7) = 60 ÷ 84 = 0.7143, so A = 44.42°.
cos B = (5² + 7² − 6²) ÷ (2 × 5 × 7) = 38 ÷ 70 = 0.5429, so B = 57.12°.
C = 180° − 44.42° − 57.12° = 78.46°.
Area (Heron's formula): s = (5 + 6 + 7) ÷ 2 = 9, and Area = √(9 × 4 × 3 × 2) = √216 ≈ 14.6969.

Worked example: SAS

Sides a = 7, b = 10 and the angle between them C = 40°.
c² = 7² + 10² − 2 × 7 × 10 × cos 40° = 149 − 107.2462 = 41.7538, so c ≈ 6.4617.
Law of Sines: sin A = 7 × sin 40° ÷ 6.4617 = 0.6963, so A ≈ 44.13° and B = 180° − 40° − 44.13° = 95.87°.
Area = ½ × 7 × 10 × sin 40° ≈ 22.4976.

Worked example: ASA and AAS

Angles A = 50°, B = 60° and the side between them c = 8.
C = 180° − 50° − 60° = 70°.
c ÷ sin C = 8 ÷ sin 70° = 8.5134. Then a = 8.5134 × sin 50° ≈ 6.5217 and b = 8.5134 × sin 60° ≈ 7.3728.

AAS works the same way; only the starting ratio changes, because the known side is opposite one of the known angles.

The triangle inequality

Three lengths make a triangle only if each side is shorter than the sum of the other two. Sides 2, 3 and 6 fail, because 2 + 3 = 5 is less than 6 — the two short sides cannot meet. If the sum is exactly equal (2, 3, 5) the “triangle” collapses into a straight line. The calculator checks this first and tells you which side is too long.

Classifying triangles

The largest angle is always opposite the longest side, which gives a quick test from the sides alone: if c is the longest side, compare c² with a² + b². Equal means right, smaller means acute, larger means obtuse.

Area and heights

With three sides, Heron's formula gives the area without needing a height: Area = √(s(s − a)(s − b)(s − c)), where s is half the perimeter. With two sides and the included angle, use Area = ½ab·sin C. Once you know the area, each height follows from Area = ½ × base × height, so h = 2 × Area ÷ base. If you already know a base and height, the area calculator is quicker, and the perimeter calculator handles other shapes.

What about SSA?

Two sides and an angle that is not between them (SSA) is called the ambiguous case, because it can give two different triangles, one, or none. This calculator does not solve SSA; use one of the four unambiguous cases above.

Frequently asked questions

How do I find the angles of a triangle from its three sides?

Use the Law of Cosines: cos A = (b² + c² − a²) ÷ (2bc). Do the same for a second angle, then subtract both from 180° to get the third.

What is Heron's formula?

Area = √(s(s − a)(s − b)(s − c)), where s is half the perimeter. For sides 5, 6 and 7, s = 9 and the area is √216 ≈ 14.70.

What is the triangle inequality?

Each side of a triangle must be shorter than the sum of the other two. Lengths 2, 3 and 6 cannot form a triangle because 2 + 3 is less than 6.

When do I use the Law of Sines and when the Law of Cosines?

Use the Law of Cosines when you know three sides (SSS) or two sides and the angle between them (SAS). Use the Law of Sines when you know a side and its opposite angle, as in ASA and AAS problems.

How do I know if a triangle is acute, right or obtuse?

Find the largest angle, which is opposite the longest side. If it is less than 90° the triangle is acute, exactly 90° right, and more than 90° obtuse.

Do the angles of a triangle always add up to 180 degrees?

Yes, for every triangle drawn on a flat surface the three interior angles add up to exactly 180°. That is how the third angle is found once two are known.