The classic Pythagorean theorem question, answered both ways: find the hypotenuse from two legs, or find a missing leg from the hypotenuse and one leg.
How it works
From two legs: the hypotenuse is the square root of the sum of each leg squared. From the hypotenuse and one leg: the missing leg is the square root of the hypotenuse squared minus the known leg squared.
What this does not include
This does not include the triangle’s angles — for a version that also solves both non-right angles, use this site’s right-triangle-side-angle calculator instead.
How to use this calculator
- Choose what you know, then enter the values.
A worked example
Legs 3 and 4: hypotenuse = √(3²+4²) = 5 — the classic 3-4-5 right triangle.
Given a hypotenuse of 5 and one leg of 3, the other leg is √(5²−3²) = 4 — the reverse calculation.
What the variables mean
| Variable | Meaning |
|---|---|
| Leg A, Leg B | The two shorter sides of a right triangle |
| Hypotenuse | The longest side, opposite the right angle |
Edge cases worth knowing
This solves in either direction — finding the hypotenuse from two legs, or finding a missing leg given the hypotenuse and the other leg — rather than being locked to one fixed formula direction.
A leg equal to or longer than the hypotenuse is geometrically impossible — the hypotenuse is always the longest side of a right triangle, so the calculator declines to show a result when that relationship is violated.
Frequently asked questions
What is the Pythagorean theorem?
For any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides — a² + b² = c².
Can a leg ever be longer than the hypotenuse?
No — the hypotenuse is always the longest side of a right triangle, since it’s opposite the 90-degree angle.
What’s a practical use for finding a missing leg?
Construction and carpentry, like confirming a diagonal brace length fits a known rise and an unknown run, or vice versa.