Pythagorean Theorem Calculator
Find the missing side of a right triangle. Pick which side you're looking for, enter the other two, and see the theorem worked out with your numbers.
- c = √(a² + b²) = √(9 + 16) = √25 = 5
- A = arctan(a ÷ b) = 36.87°, B = 90° − A = 53.13°
- Leg a
- 3
- Leg b
- 4
- Hypotenuse c
- 5
- Angles A · B
- 36.87° · 53.13°
- Area
- 6
- Perimeter
- 12
- Height to c
- 2.4
See why a² + b² = c²
Build a square on each side of a right triangle. Change the legs and watch the two smaller squares always add up to exactly the big one. That is the whole theorem: it's a statement about areas.
9 + 16 = 25 → c = √25 = 5
Whole-number answer: (3, 4, 5) is a Pythagorean triple.
The Pythagorean theorem
In a right triangle, the square on the hypotenuse equals the sum of the squares on the two legs: a² + b² = c². Rearranged:
- Hypotenuse: c = √(a² + b²)
- A leg: a = √(c² − b²)
It only works for right triangles. For other triangles, the law of cosines, c² = a² + b² − 2ab cos C, is the general version — when C = 90°, cos C = 0 and it reduces to Pythagoras.
Pythagorean triples
Whole-number solutions are handy for checking work and squaring corners:
| a | b | c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 20 | 21 | 29 |
| 12 | 35 | 37 |
| 9 | 40 | 41 |
| 11 | 60 | 61 |
Questions people ask
Who discovered the Pythagorean theorem?
It is named after the Greek mathematician Pythagoras (6th century BC), but Babylonian clay tablets such as Plimpton 322 list Pythagorean triples more than a thousand years earlier.
Does it work in 3D?
Yes. The space diagonal of a box is √(l² + w² + h²) — apply the theorem twice. The distance formula calculator handles 3D points.
How do I find a leg if I know the hypotenuse?
Subtract the square of the known leg from the square of the hypotenuse and take the square root: a = √(c² − b²). For c = 13, b = 5: a = √(169 − 25) = 12.
Stuck on a word problem?
Paste a homework question or describe your project. The AI tutor names the formula and works it through step by step. Always check the result with the calculator above.