Pythagorean Theorem Calculator
c (hypotenuse)5.0000
The Pythagorean theorem relates the three sides of a right triangle: the square of the hypotenuse equals the sum of the squares of the two legs. This focused calculator solves for whichever single side is missing, returning just that length. Pick whether you are finding the hypotenuse or one of the legs and supply the two values you already know.
Formula
c = √(a² + b²); leg = √(c² - known_leg²)
- a, b
- The two legs (the sides meeting at the right angle)
- c
- The hypotenuse, the side opposite the right angle
How it works
- Choose a mode: find c (the hypotenuse) from the two legs, or find a leg (a or b) from the other leg and the hypotenuse.
- When finding the hypotenuse the tool computes the square root of the sum of the squared legs. When finding a leg it subtracts the known leg squared from the hypotenuse squared and takes the square root, which requires the hypotenuse to be longer than the known leg.
Worked examples
Find the hypotenuse of a right triangle with legs 3 and 4.
- Square the legs: 3² = 9 and 4² = 16.
- Add them: 9 + 16 = 25.
- Take the square root: √25 = 5.
The hypotenuse c = 5.
Find the missing leg when one leg is 3 and the hypotenuse is 5.
- Square the values: 5² = 25 and 3² = 9.
- Subtract: 25 - 9 = 16.
- Take the square root: √16 = 4.
The missing leg = 4.
Frequently asked questions
- How is this different from the right triangle calculator?
- This calculator returns only the single missing side length. The right triangle calculator additionally reports the two non-right angles, the area, and the perimeter, so use that one when you need a full solution.
- Why must the hypotenuse be longer than each leg?
- The hypotenuse is the longest side of a right triangle. When solving for a leg, the tool subtracts the leg squared from the hypotenuse squared, so the hypotenuse must exceed the known leg or the result would not be a real number.
- Does the theorem work for non-right triangles?
- No. The relationship a² + b² = c² holds only for right triangles. For triangles without a right angle you would use the law of cosines instead.