Triangle Calculator (Pythagorean Theorem, Sides, Angles & Area)

Solve any triangle: find the hypotenuse with the Pythagorean theorem, or get missing sides, angles, area (Heron’s formula) and perimeter from SSS, SAS or ASA/AAS, with a diagram and step-by-step working.

Enter any two of the legs (a, b) and the hypotenuse (c). The Pythagorean theorem gives the third side.

Try a Pythagorean triple

Angles are in degrees. Results are rounded to four decimal places.

The Pythagorean theorem

In a right triangle with legs a and b and hypotenuse c, a² + b² = c². Legs of 3 and 4 give c = √(9 + 16) = √25 = 5. Work backwards the same way: a hypotenuse of 13 and a leg of 5 leave √(169 − 25) = √144 = 12 for the other leg. On the Right triangle tab, fill in whichever two values you know and the third appears.

Pythagorean triples

Whole-number right triangles are called Pythagorean triples. Besides 3-4-5 you will often meet 5-12-13, 8-15-17, 7-24-25 and 20-21-29. Any multiple also works, so 6-8-10 and 9-12-15 are triples too, and the calculator tells you when your answer is one and which base triple it scales. Carpenters use the 3-4-5 rule to square up a corner: mark 3 ft along one side and 4 ft along the other, and the diagonal should read exactly 5 ft.

Solving triangles that are not right-angled

What you know How it is solved
Three sides (SSS) Law of cosines: cos A = (b² + c² − a²) / 2bc
Two sides and the angle between them (SAS) Law of cosines: a² = b² + c² − 2bc·cos A
One side and two angles (ASA, AAS) Third angle = 180° minus the other two, then the law of sines

Area comes from Heron’s formula. For sides 5, 6 and 7, the semi-perimeter is s = 9 and the area is √(9 × 4 × 3 × 2) = √216 ≈ 14.70. Every result comes with the working written out line by line, which is handy for checking homework.

Acute, right or obtuse?

Square the longest side and compare it with the other two squared and added. Equal means a right triangle; bigger means obtuse; smaller means acute. Sides 2, 3 and 4 give 16 against 13, so the triangle is obtuse, with a largest angle of about 104.5°. Equilateral and isosceles triangles are flagged as well.

Related tools

Convert your lengths with the unit converter, or work with fractional measurements in the fraction calculator.