Pythagorean Theorem Calculator

Find the missing side of a right triangle, with angles and area.

Pythagorean Theorem Calculator by AIPreciseTools · Open the full calculator ↗

The Pythagorean theorem

In a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides.

a² + b² = c² Hypotenuse: c = √(a² + b²) Missing leg: b = √(c² − a²) Angle A = arctan(a ÷ b) Area = a × b ÷ 2

Example: legs of 3 and 4 give c = √(9 + 16) = √25 = 5. The angles are 36.87° and 53.13°, the area is 6 and the perimeter 12. With a hypotenuse of 13 and a leg of 5, the other leg is √(169 − 25) = 12.

Common Pythagorean triples

These whole-number right triangles come up constantly: 3-4-5, 5-12-13, 8-15-17, 7-24-25, 20-21-29, and any multiple of them, like 6-8-10.

Builders use 3-4-5 to check a corner is square: measure 3 ft along one wall and 4 ft along the other; if the diagonal is exactly 5 ft, the corner is 90°. For roof angles and rise over run, see the slope calculator.

Frequently asked questions

How do you find the hypotenuse?

Square both legs, add them, and take the square root: c = √(a² + b²).

Does the Pythagorean theorem work for all triangles?

No, only right triangles. For other triangles, use the law of cosines: c² = a² + b² − 2ab × cos(C).

What is the 3-4-5 rule?

A triangle with sides 3, 4 and 5 is always a right triangle, so builders use it to check that corners are square.

Was this calculator helpful?