Pythagorean Theorem Calculator
The hypotenuse of a right triangle from its two legs.
Input sheet
DIY at your own risk. Calcora's calculators and guides are general estimates and information only — not professional, engineering, legal, or safety advice. Always verify local building codes and permit requirements, and hire a licensed pro for electrical, gas, plumbing, structural, or any work you're not fully comfortable doing yourself.
The Pythagorean theorem links the three sides of a right triangle and is the basis for measuring diagonals, checking square corners, and computing straight-line distances. This finds the hypotenuse from the two legs.
How it works
For a right triangle, c² = a² + b², so c is the square root of the sum of the squared legs.
In any right triangle, the square of the longest side (the hypotenuse, opposite the right angle) equals the sum of the squares of the other two sides. Taking the square root of that sum recovers the hypotenuse.
The same relationship is how distance is measured on a coordinate plane: the straight-line distance between two points is the hypotenuse of the right triangle formed by their horizontal and vertical separations.
Hypotenuse c = square root of (a² + b²)
Worked examples
A right triangle with legs 3 and 4. → 5
3² + 4² = 9 + 16 = 25, and the square root of 25 is 5 — the classic 3-4-5 triangle.
Legs of 5 and 12. → 13
5² + 12² = 25 + 144 = 169, and the square root of 169 is 13.
Tips & gotchas
- Builders use the 3-4-5 rule to verify a square corner: if the sides measure 3 and 4 units, the diagonal must be exactly 5.
- To find a missing leg instead of the hypotenuse, rearrange: a = √(c² − b²).
- The theorem applies only to right triangles. For other triangles, use the law of cosines.
FAQ
Which side is the hypotenuse?
It is the longest side, always opposite the 90-degree angle. The other two sides are the legs.
How do I find a leg if I know the hypotenuse?
Subtract instead of add: a = √(c² − b²). Square the hypotenuse, subtract the known leg squared, then take the square root.
What is a Pythagorean triple?
Three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13, and 8-15-17. They form right triangles with integer sides.
Related calculators
Percentage Calculator · Percent Change Calculator · Average (Mean) Calculator · Ratio Calculator · Exponent Calculator