Math
Pythagorean Theorem Calculator
The hypotenuse or the missing leg, in a second
Fill in two sides of the right triangle, leave the missing one blank, and this Pythagorean theorem calculator finds it instantly. We also give you the area and the perimeter.
The key idea
The Pythagorean theorem is not just homework: it is a job-site rule
With legs of 3 and 4, the hypotenuse is exactly 5. That is why builders mark 3 ft and 4 ft along two lines and check that the diagonal measures 5 ft: if it does, the corner is square. It works the same with 6, 8 and 10 or with 30, 40 and 50 in.
How it is calculated
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs:
c² = a² + b² → c = √(a² + b²) a = √(c² − b²)
Use the same unit for every side (inches, feet, meters…). The area comes out in that unit squared.
Worked example
Legs of 3 and 4: c = √(9 + 16) = √25 = 5. Area = 3 × 4 / 2 = 6. Perimeter = 3 + 4 + 5 = 12.
Typical cases
Pythagorean triples and common right triangles
The hypotenuse of common right triangles. The first ones are whole-number triples, like 3-4-5, used to square a corner.
| Leg a | Leg b | Hypotenuse c | Area | Perimeter |
|---|---|---|---|---|
| 3 | 4 | 5 | 6 | 12 |
| 5 | 12 | 13 | 30 | 30 |
| 6 | 8 | 10 | 24 | 24 |
| 7 | 24 | 25 | 84 | 56 |
| 8 | 15 | 17 | 60 | 40 |
| 9 | 12 | 15 | 54 | 36 |
| 9 | 40 | 41 | 180 | 90 |
| 12 | 16 | 20 | 96 | 48 |
| 15 | 20 | 25 | 150 | 60 |
| 20 | 21 | 29 | 210 | 70 |
| 1 | 1 | 1.4142 | 0.5 | 3.4142 |
| 1 | 2 | 2.2361 | 1 | 5.2361 |
Save or share this table as an image Common questions
Frequently asked questions
How do I know if a triangle is a right triangle?
It is a right triangle if a² + b² = c², where c is the longest side. Type all three sides, with the longest as the hypotenuse, and the calculator checks it.
How do I find a missing leg?
Subtract the square of the other leg from the square of the hypotenuse and take the square root: a = √(c² − b²). With a hypotenuse of 13 and a leg of 5, the other leg is √(169 − 25) = 12.
What is the Pythagorean theorem used for in real life?
It finds diagonal distances. For example, the diagonal of a TV screen, how long a ladder must be to reach a given height, or the straight-line distance on a map.
How long is the diagonal of a square?
It is the side times √2, about 1.414 times the side. A 10 ft square has a diagonal of 14.14 ft.
Why is the hypotenuse always the longest side?
Because c² = a² + b² is larger than both a² and b². If you type a hypotenuse shorter than or equal to a leg, the calculator tells you it is not possible.
Does it work for triangles that are not right triangles?
No, the Pythagorean theorem only works for right triangles. For the area of any triangle from its three sides, use Heron's formula in the area calculator.
Your next calculation
Missing a calculator?
Tell us what you need to calculate. The most requested ones are the first we build, with their formula, a worked example and the source.