Pythagorean Theorem Calculator

Find the hypotenuse or a leg of a right triangle.

What is the Pythagorean theorem and how does this calculator work?

The Pythagorean theorem states that in a right triangle, a² + b² = c², where c is the hypotenuse. This calculator can find either the hypotenuse (if you know both legs) or a missing leg (if you know one leg and the hypotenuse). Simply choose what you want to solve for, enter the known side lengths, and click "Calculate". The result is computed instantly using the square root of the appropriate equation.

How to use the Pythagorean Theorem Calculator

Select "Hypotenuse" to calculate c from sides a and b, or "Leg" to find a or b from the hypotenuse and one known leg. Enter the known values — the input fields automatically adjust based on your selection. Click "Calculate" to see the missing side length. The calculator works with any positive numbers, including decimals.

Example calculations

Finding the hypotenuse: sides a = 3 and b = 4 → c = √(3² + 4²) = √25 = 5. Finding a leg: hypotenuse c = 5 and side a = 3 → b = √(5² – 3²) = √16 = 4. The calculator also works with non-integer values: a = 1.5, b = 2.0 → c = √(2.25 + 4) = √6.25 = 2.5.

Frequently Asked Questions

What if I enter values that cannot form a right triangle?

When finding a leg, the hypotenuse must be larger than the known leg. If not, the calculator will show an error because the triangle cannot exist. For the hypotenuse, any two positive leg values form a valid right triangle.

In what units is the result expressed?

The calculator uses the same unit as your input values. If you enter sides in meters, the result is in meters. For feet, the output is in feet. The Pythagorean relationship itself is independent of any specific unit of measurement.