CalcThis CalcThis
Triangles, drawn to scale

Triangle Calculator

Solve any triangle from any three values, or a right triangle from any two — Pythagorean theorem included. See it drawn to scale with every side, angle, area and height, and the second triangle when the data fits two.

Your triangle

Length unit
Angles

Type plain numbers like 3 or 2.5. Exact roots also work, e.g. sqrt(5) or √5. Any 2 values for a right triangle; any 3 (with a side) for any triangle.

Area
—
Enter any 2 values: two lengths, a length and an angle, or the area with one more.
Area
—

How to use the triangle calculator

Pick Right triangle if one angle is 90°, and enter any two values — two sides, a side and an angle, or the area with one more value. Pick Any triangle and enter any three of the six boxes (sides a, b, c and angles A, B, C), as long as at least one is a side. The calculator works out which case you have — SSS, SAS, ASA, AAS or SSA — and fills in every side, angle, the area, perimeter and heights, with a to-scale drawing and the working underneath.

Side a is opposite angle A, side b opposite B, and side c opposite C. Lengths are plain numbers like 3 or 2.5; exact roots such as sqrt(5) also work.

The Pythagorean theorem

a² + b² = c² FOR A RIGHT TRIANGLE, c IS THE HYPOTENUSE

The square of the hypotenuse equals the sum of the squares of the two legs. With legs 3 and 4: c = √(9 + 16) = 5. With a hypotenuse of 5 and one leg of 3, the other leg is √(25 − 9) = 4. The Pythagoras in squares picture under every right-triangle result draws the three squares at true relative size, so you can see the two small areas fill the big one.

Solve a triangle: SSS, SAS, ASA, AAS and SSA

Every case reduces to two laws. The law of cosines, c² = a² + b² − 2ab·cos C, handles three sides (SSS) and two sides with the angle between them (SAS). The law of sines, a ÷ sin A = b ÷ sin B = c ÷ sin C, handles two angles and a side (ASA, AAS) and two sides with an angle that is not between them (SSA). The three angles always add up to 180°. Three angles alone (AAA) only fix the shape, not the size, so at least one side is needed.

The ambiguous case (SSA)

Two sides and a non-included angle can describe two triangles, one, or none. With a = 8, b = 10 and A = 40° the sine of B is 10 × sin 40° ÷ 8 = 0.8035, which matches both B = 53.46° (c = 12.42) and B = 126.54° (c = 2.90). The calculator shows Triangle 1 and Triangle 2 and lets you switch between them.

Special right triangles

A 30-60-90 triangle has sides in the ratio 1 : √3 : 2 — a short leg of 5 gives a long leg of 5√3 ≈ 8.66 and a hypotenuse of 10. A 45-45-90 triangle has sides 1 : 1 : √2 — legs of 7 give a hypotenuse of 7√2 ≈ 9.90. Whole-number right triangles such as 3-4-5, 5-12-13 and 8-15-17 are Pythagorean triples. The calculator names these automatically when your numbers match.

Area, perimeter and height

The area is ½ × base × height. From three sides it uses Heron’s formula, √(s(s − a)(s − b)(s − c)), where s is the semiperimeter. For sides 5, 6 and 7, s = 9 and the area is √216 ≈ 14.70. The perimeter is a + b + c, and each height is twice the area divided by the side it stands on.

Triangle types

By sides, a triangle is equilateral (three equal sides, all angles 60°), isosceles (two equal sides) or scalene (none equal). By angles it is acute (all under 90°), right (one angle is exactly 90°) or obtuse (one angle over 90°). Any two sides must add up to more than the third, or no triangle exists.

More with Go advanced

Go advanced adds the medians, the inradius and circumradius, exterior angles, vertex coordinates, centroid, incenter and circumcenter, every angle in degrees, degrees-minutes-seconds and radians, rounding to decimals or significant figures, a copy button, and diagram overlays for the heights, medians, incircle and circumcircle.

Related tools

Building stairs? The Stair Calculator uses the same right-triangle geometry for stringer length. For flat areas of any shape, use the Square Footage Calculator.

Common questions

How do you find the missing side of a right triangle?

Use the Pythagorean theorem, a² + b² = c², where c is the hypotenuse (the side opposite the 90° angle). To find the hypotenuse, c = √(a² + b²). To find a leg, subtract: a = √(c² − b²). For legs of 3 and 4, c = √(9 + 16) = 5.

What do I need to know to solve any triangle?

Any three values that include at least one side: three sides (SSS), two sides and the angle between them (SAS), two angles and a side (ASA or AAS), or two sides and an angle that is not between them (SSA). Three angles alone only give the shape, not the size, because every size of triangle can have the same angles.

What is the ambiguous case (SSA)?

When you know two sides and an angle that is not between them, the data can fit two different triangles, one with an acute angle and one with an obtuse angle, or only one, or none. With a = 8, b = 10 and A = 40° there are two triangles: c ≈ 12.42 with B ≈ 53.46°, and c ≈ 2.90 with B ≈ 126.54°. The calculator shows both and lets you switch between them.

What are the 30-60-90 and 45-45-90 triangles?

They are special right triangles with fixed side ratios. In a 30-60-90 triangle the sides are in the ratio 1 : √3 : 2, so a short leg of 5 gives a long leg of 5√3 ≈ 8.66 and a hypotenuse of 10. In a 45-45-90 triangle the sides are 1 : 1 : √2, so legs of 7 give a hypotenuse of 7√2 ≈ 9.90.

How do you find the area of a triangle?

Half the base times the height: A = ½ × b × h. If you only know the three sides, use Heron’s formula, A = √(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 √(9 × 4 × 3 × 2) = √216 ≈ 14.70. With two sides and the angle between them, the area is ½ × a × b × sin C.