What does the Pythagorean theorem solve?
The Pythagorean theorem describes the side lengths of a right triangle. If a and b are the two legs that meet at the 90° angle, and c is the hypotenuse opposite it, then a² + b² = c². Give the solver any two side lengths and choose the third side to calculate.
Choose the equation for the missing side
- Find the hypotenuse: c = √(a² + b²). Square both legs, add them, then take the square root.
- Find leg a: a = √(c² − b²). Square the hypotenuse, subtract the other leg squared, then take the square root.
- Find leg b: b = √(c² − a²). Square the hypotenuse, subtract the known leg squared, then take the square root.
The hypotenuse must be longer than either leg. If you solve for a leg, the expression under the square root must be positive.
Worked examples
Find the hypotenuse when the legs are 3 and 4
c = √(3² + 4²) = √(9 + 16) = √25 = 5. The side lengths 3, 4, and 5 form a Pythagorean triple.
Find a leg when c = 13 and b = 12
a = √(13² − 12²) = √(169 − 144) = √25 = 5.
Find a leg when c = 10 and a = 6
b = √(10² − 6²) = √(100 − 36) = √64 = 8.
Common mistakes to avoid
- Use c for the hypotenuse, which is always opposite the right angle and is the longest side.
- Square each length before adding or subtracting; do not add the side lengths first.
- When finding a leg, subtract the known leg's square from the hypotenuse's square.
- Keep units consistent. Convert them first if they differ.
- Round only at the end. Rounding intermediate values can change the final answer.
Frequently asked questions
Can I solve for any side of a right triangle?
Yes. Choose the missing side in the calculator. You need the lengths of the other two sides. The theorem applies to right triangles.
How do I find a missing leg?
Square the hypotenuse and the known leg, subtract the known leg's square from the hypotenuse's square, then take the square root: a = √(c² − b²) or b = √(c² − a²).
Can I use this equation for a triangle without a right angle?
No. The equation a² + b² = c² applies when the triangle has a 90° angle. For other triangles, a different rule such as the Law of Cosines is needed.
Why must the hypotenuse be the longest side?
The hypotenuse is opposite the 90° angle, so it is the longest side in a right triangle. A proposed hypotenuse shorter than a leg cannot produce a positive missing leg using this theorem.
Does the solver save my measurements?
No. The calculation runs in your browser, and this page does not send the entered lengths to a calculation server.
For angles, area, perimeter, and a diagram, try the full right triangle solver. For another way to find a missing side, read the missing-side guide. You can also use our ratio solver.