The Pythagorean theorem
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Rearrange it to find a missing leg: a = √(c² − b²).
| Use it to | Formula |
|---|---|
| Find the hypotenuse | c = √(a² + b²) |
| Find a leg | a = √(c² − b²) |
| Test for a right angle | a² + b² = c² exactly |
What each letter means
- a, b
- The legs: the two sides that meet at the right angle
- c
- The hypotenuse: the longest side, opposite the 90° angle
The Pythagorean theorem calculator
The relationship that holds every right triangle together. Change a value and the diagram, result, and working update together.
Your measurements
In missing-leg mode, the second measurement is the hypotenuse c. Lengths use the same arbitrary unit.
Why it works
The idea
For a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. The hypotenuse, c, is always opposite the 90° angle and is the longest side.
Worked examples
1Find the hypotenuse
- Legs a = 6 and b = 8.
- c² = 6² + 8² = 36 + 64 = 100.
- c = √100 = 10.
Answer: The hypotenuse is 10 units.
2Find a missing leg
- Hypotenuse c = 13 and leg a = 5.
- b² = c² − a² = 169 − 25 = 144.
- b = √144 = 12.
Answer: The missing leg is 12 units.
3Is it a right triangle?
- Sides 7, 24, and 25. The longest side is 25.
- 7² + 24² = 49 + 576 = 625 and 25² = 625.
Answer: Yes. The sides satisfy a² + b² = c², so the angle opposite 25 is 90°.
Common mistakes
- This relationship only applies directly to right triangles. For an arbitrary triangle, use the law of cosines.
Make the formula move.
Open the full tool for a larger workspace.
Keep exploring
The Pythagorean theorem: common questions
Wondering about the why? Start here.
What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The hypotenuse c is the side opposite the right angle.
Use the Pythagorean calculatorDoes the Pythagorean theorem work for all triangles?
No. It only holds for right triangles. For any other triangle, use the law of cosines, c² = a² + b² − 2ab cos C, which reduces to Pythagoras when C = 90°.
Read the law of cosines