- Home
- Math
- Pythagorean Theorem Calculator
Pythagorean Theorem Calculator
In a right triangle, a² + b² = c², where c is the longest side (the hypotenuse). With legs 3 and 4, c = √(9 + 16) = 5.
Builders use this every day: mark 3 m along one wall and 4 m along the other. If the diagonal between the marks is exactly 5 m, the corner is square.
Which side is missing?
Leave the side you want empty, or press Find next to it.
Do these three sides make a right triangle?
How long is the diagonal of a box?
How we got this
Compare options
Row 1 follows the calculator above. Edit any cell.Bulk mode
My saved calculations
Stored only in this browser. Nothing is sent to our servers.Country & format
Change the country edition from the menu at the top.Your next step
Your answer carries over, so you don’t have to type it again.
The Pythagorean theorem
a² + b² = c²
It only works for right triangles (one angle exactly 90°). The hypotenuse c is opposite the right angle and is always the longest side.
| You know | Formula |
|---|---|
| Both legs a and b | c = √(a² + b²) |
| Hypotenuse c and leg b | a = √(c² − b²) |
| Hypotenuse c and leg a | b = √(c² − a²) |
Worked examples
Ladder against a wall
A 5 m ladder stands 1.5 m from the wall. How high does it reach? h = √(5² − 1.5²) = √(25 − 2.25) = √22.75 ≈ 4.77 m.
TV screen size
A screen 121 cm wide and 68 cm tall has a diagonal of √(121² + 68²) = √19,265 ≈ 138.8 cm, which is about 55 inches.
Pythagorean triples
Whole-number sides that fit exactly. Any multiple also works: 3-4-5 → 6-8-10 → 9-12-15.
| a | b | c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 20 | 21 | 29 |
| 9 | 40 | 41 |
| 12 | 35 | 37 |
| 11 | 60 | 61 |
Checking a right angle (the converse)
For any three sides with c the longest: if a² + b² = c² the triangle is right; if a² + b² > c² it is acute; if a² + b² < c² it is obtuse. This is how carpenters check that a frame is square.
Frequently asked questions
How do I find the hypotenuse?
Square both legs, add them, and take the square root: c = √(a² + b²).
How do I find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse and take the square root: a = √(c² − b²).
Does the Pythagorean theorem work for every triangle?
No, only for right triangles. For other triangles use the law of cosines: c² = a² + b² − 2ab·cos C.
What is the 3-4-5 rule?
A triangle with sides 3, 4 and 5 (or any multiple) always has a right angle. It is used to square corners in building.