Use this free Pythagorean theorem calculator to find the hypotenuse or a missing leg of a right triangle. Enter any two sides, and the calculator finds the third, with steps. You can also check whether three sides form a right triangle, find the distance between two points, and find the diagonal of a rectangle or a box. No signup needed.
Leave the unknown side empty. The hypotenuse c is the longest side.
Any order. The calculator treats the longest side as c.
Exact answers are exact and decimals are rounded for display. The theorem applies to right triangles in flat geometry. For safety-critical work, measure carefully and follow local rules.
Find a missing side:
For angles and trigonometry, see our Right Triangle Calculator.
In a right triangle (a triangle with a 90° angle), the square of the hypotenuse equals the sum of the squares of the two legs.
a² + b² = c²
The theorem works only for right triangles. In geometric terms, the area of the square on the hypotenuse equals the sum of the areas of the squares on the other two sides. For a 3-4-5 triangle: 3² + 4² = 9 + 16 = 25 = 5².
The relationship is named after the Greek mathematician Pythagoras, but it was known much earlier. Babylonian clay tablets and the Sulba Sutras of ancient India (such as those of Baudhayana) describe the rule, and many cultures used it for building and surveying. Mathematicians have since found hundreds of different proofs.
Hypotenuse: c = √(a² + b²)
A leg: a = √(c² − b²), and b = √(c² − a²)
Converse (check for a right triangle): with c as the longest side,
| Result | Triangle type |
|---|---|
| a² + b² = c² | Right triangle |
| a² + b² > c² | Acute triangle (all angles less than 90°) |
| a² + b² < c² | Obtuse triangle (one angle greater than 90°) |
Distance between two points (x₁, y₁) and (x₂, y₂):
d = √[(x₂ − x₁)² + (y₂ − y₁)²]
Rectangle diagonal: d = √(l² + w²)
Box (3D) diagonal: d = √(l² + w² + h²)
Area: ½ × a × b, and Perimeter: a + b + c
All answers are rounded for display.
Legs of 3 and 4.
Legs of 5 and 7:
Hypotenuse 13 and a leg of 5.
Hypotenuse 10 and a leg of 6:
Hypotenuse 9 and a leg of 4:
Legs of 1.5 and 2.
Always put the longest side as c.
Points (2, 3) and (10, 9).
Points (−1, −2) and (4, 10):
A rectangle that is 12 by 5.
A box that is 3 by 4 by 12.
A box that is 2 by 3 by 6:
A cube with a side of 4:
A 5 m ladder reaches 3 m up a wall. How far is the foot from the wall?
For real ladders, follow the ladder’s label and local safety guidance.
A field is 120 m by 90 m. You can walk along two sides (210 m) or across the diagonal.
An equilateral triangle has sides of 10. Split it in half to make a right triangle with a hypotenuse of 10 and a leg of 5.
Both legs are 1.
In general, the hypotenuse is leg × √2.
For a 3-4-5 triangle, the squares on the sides have areas 9, 16, and 25.
Scale 3-4-5 by 20.
A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c². Any multiple of a triple is also a triple.
| Triple | Check |
|---|---|
| 3, 4, 5 | 9 + 16 = 25 |
| 5, 12, 13 | 25 + 144 = 169 |
| 8, 15, 17 | 64 + 225 = 289 |
| 7, 24, 25 | 49 + 576 = 625 |
| 20, 21, 29 | 400 + 441 = 841 |
| 9, 40, 41 | 81 + 1,600 = 1,681 |
| 6, 8, 10 | Double of 3-4-5 |
For whole numbers m > n > 0, this gives a triple:
a = m² − n², b = 2mn, c = m² + n²
| m | n | a = m² − n² | b = 2mn | c = m² + n² |
|---|---|---|---|---|
| 2 | 1 | 3 | 4 | 5 |
| 3 | 2 | 5 | 12 | 13 |
| 4 | 1 | 15 | 8 | 17 |
| 4 | 3 | 7 | 24 | 25 |
| 5 | 2 | 21 | 20 | 29 |
| 5 | 4 | 9 | 40 | 41 |
In a right triangle, a² + b² = c², where c is the hypotenuse and a and b are the legs.
Add the squares of the two legs and take the square root: c = √(a² + b²). For legs 3 and 4, c = 5.
Subtract the square of the known leg from the square of the hypotenuse and take the square root. For c = 13 and a = 5, the other leg is √(169 − 25) = 12.
No. It works only for right triangles.
Check if a² + b² = c², with c as the longest side. If equal, it is a right triangle. If a² + b² is greater, the triangle is acute, and if smaller, it is obtuse.
Three whole numbers that satisfy a² + b² = c², such as 3-4-5 or 5-12-13.
If the sides of a triangle satisfy a² + b² = c², then the triangle is a right triangle.
Use d = √[(x₂ − x₁)² + (y₂ − y₁)²]. For (2, 3) and (10, 9), the distance is √(64 + 36) = 10.
Use d = √(l² + w²). For a 12 by 5 rectangle, it is 13.
Use d = √(l² + w² + h²). For a 3 by 4 by 12 box, it is 13.
A triangle with sides 3, 4, and 5 has a right angle. Builders use multiples of it (such as 6-8-10) to check that a corner is square.
Yes. It is free, with no registration and no limits.
Exact forms are exact. Decimals are rounded for display.
A few of the most-used tools in each hub.
This calculator is for general and educational use. Exact answers are exact, and decimals are rounded for display. For construction, carpentry, surveying, ladders, or any work that affects safety, measure carefully, follow local rules and safety guidance, and consult a qualified professional. Follow your teacher’s rules on the form of the answer.