Pythagorean Theorem Calculator
Enter any two sides of a right triangle and leave the third blank. Side c is the hypotenuse.
The theorem
For a right triangle with legs a and b and hypotenuse c, a² + b² = c². It lets you find any one side when you know the other two. To find the hypotenuse, take c = √(a² + b²). To find a leg, take a = √(c² − b²).
Worked examples
Finding the hypotenuse
With legs 3 and 4, c² = 9 + 16 = 25, so c = 5.
Finding a leg
With hypotenuse 13 and one leg 5, b² = 169 − 25 = 144, so b = 12.
A real use: ladder height
A 5 m ladder stands with its foot 1.5 m from a wall. The height it reaches is √(25 − 2.25) = √22.75, which is about 4.77 m.
Common mistakes
Using the theorem on a triangle with no right angle is the biggest error. The second is putting a leg in the hypotenuse slot: c must be the longest side, so the calculator warns you if c is not larger than a or b. Also remember to subtract, not add, when you solve for a leg.
Where it connects
The same formula gives the distance between two points on a graph, which is how the slope, distance and midpoint calculator works. For roots and squares, see the quadratic formula calculator.
Frequently asked questions
What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c².
Which side is the hypotenuse?
The hypotenuse is the side opposite the right angle. It is always the longest side.
Does it work for triangles without a right angle?
No. For other triangles, use the law of cosines, which reduces to the Pythagorean theorem when the angle is 90 degrees.
What is a Pythagorean triple?
A set of three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 and 5, 12, 13.
More Geometry calculators
Browse every geometry calculator.