Pythagorean Theorem Calculator

Choose the missing side, then enter the other two lengths.

Missing side

Pythagorean theorem formula

For a right triangle, a² + b² = c². The two sides that meet at the right angle are legs a and b. The side across from the right angle is hypotenuse c. The letter names can change in a worksheet, but the hypotenuse must stay in the c position of this formula.

Finding the hypotenuse

With legs a = 3 and b = 4, substitute the values: c² = 3² + 4² = 9 + 16 = 25. Take the positive square root because a side length is positive, so c = √25 = 5. The result area keeps the values and their squares together.

Finding a missing leg

Rearrange before substituting. To find a, use a = √(c² − b²); to find b, use b = √(c² − a²). If the entered hypotenuse is equal to or shorter than the known leg, the values cannot form a non-degenerate right triangle and the calculator identifies that conflict.

Common Pythagorean triples

abc
345
51213
81517
72425

What this calculator assumes

All entries use the same length unit and describe a right triangle. The fixed diagram explains which side is a, b, or c; it is not a scale drawing. Results use browser floating-point arithmetic and display up to ten decimal places, so preserve the precision appropriate to the original measurements.

Frequently asked questions

What is the Pythagorean theorem?

For a right triangle, a² + b² = c², where a and b are the perpendicular legs and c is the hypotenuse opposite the right angle.

How do I find the hypotenuse?

Square both legs, add the squares, and take the positive square root: c = √(a² + b²). Legs 3 and 4 produce c = 5.

How do I find a missing leg?

Subtract the known leg's square from the hypotenuse's square, then take the positive square root. For example, a = √(c² − b²).

Why must the hypotenuse be the longest side?

Because c² equals a² plus the additional positive value b², c² is greater than either leg's square in a non-degenerate right triangle.

Can this calculator prove any triangle is right?

It checks the Pythagorean relationship for the lengths you enter. Real measurements have uncertainty, so use an appropriate tolerance instead of treating rounded field measurements as exact proof.

Sources and method

Related tools