Pythagorean Theorem Calculator: Find Any Missing Side
Use this free Pythagorean theorem calculator to find the hypotenuse or a missing leg, then learn the a² + b² = c² formula with worked examples and exam tips.

A Pythagorean theorem calculator finds the missing side of a right-angled triangle from the other two sides, using a² + b² = c². Type the two sides you know below and it gives the third, with the working shown, so you can check your homework or your exam answers in seconds.
What is the Pythagorean theorem?
The Pythagorean theorem says that in any right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². It is named after the Greek mathematician Pythagoras (about 570–495 BC), although Babylonian clay tablets show the idea was used over 1,000 years earlier.
- Legs (a and b) are the two sides that meet at the right angle (90°).
- The hypotenuse (c) is the side opposite the right angle. It is always the longest side.
So the rule "a squared plus b squared equals c squared" only works when the triangle has a right angle. For other triangles you need the cosine rule.
How to find the hypotenuse
To find the hypotenuse, square both legs, add them, then take the square root: c = √(a² + b²).
- Square side a.
- Square side b.
- Add the two squares.
- Square-root the total.
Worked example: a 3, 4, 5 triangle
A right triangle has legs of 3 cm and 4 cm.
- 3² = 9 and 4² = 16
- 9 + 16 = 25
- c = √25 = 5 cm
Worked example: a ladder against a wall
A ladder's foot is 1.5 m from a wall and its top reaches 3.6 m up the wall. How long is the ladder?
- c² = 1.5² + 3.6² = 2.25 + 12.96 = 15.21
- c = √15.21 = 3.9 m
How to find the missing side of a right triangle
To find a missing leg, rearrange the formula and subtract instead of adding: a = √(c² − b²). The hypotenuse is always squared first and the known leg is taken away from it.
Worked example: a missing leg
A right triangle has a hypotenuse of 13 m and one leg of 5 m.
- 13² = 169 and 5² = 25
- 169 − 25 = 144
- a = √144 = 12 m
A quick check: the answer for a leg must be shorter than the hypotenuse. If you get a longer number, you added when you should have subtracted.
Pythagorean triples list
A Pythagorean triple is a set of three whole numbers that fit a² + b² = c² exactly. Knowing the common ones saves time in exams, because many questions are built on them.
| a | b | c | 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 + 1600 = 1681 |
Any multiple of a triple is also a triple: 6, 8, 10 and 30, 40, 50 both come from 3, 4, 5.
How to tell if a triangle is right-angled
The theorem works backwards too (this is called the converse). Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle has a right angle.
- Sides 9, 12, 15: 81 + 144 = 225 = 15², so it is right-angled.
- Sides 6, 7, 9: 36 + 49 = 85, but 9² = 81, so it is not.
Builders use this to check corners are square: measure 3 m along one wall, 4 m along the other, and the diagonal should be exactly 5 m.
Where is the Pythagorean theorem used?
- Distance between two points on a graph: d = √((x₂ − x₁)² + (y₂ − y₁)²) is the theorem in coordinate form.
- Screen sizes: a TV sold as 55 inches is measured along its diagonal.
- Vectors and forces in physics: the size of a resultant of two forces at right angles, as in our vectors tool.
- Trigonometry: on the unit circle, sin²θ + cos²θ = 1 is Pythagoras with a hypotenuse of 1.
- 3D shapes: the space diagonal of a box is √(l² + w² + h²), which uses the theorem twice.
Common mistakes
- Adding when finding a leg. For a leg, subtract: a² = c² − b².
- Forgetting the square root. a² + b² gives c², not c. Take the root at the end.
- Labelling the wrong side as c. The hypotenuse is opposite the right angle, not just "the side on the slant".
- Using it on a triangle with no right angle. Use the sine or cosine rule there.
- Rounding too early. Keep the full value until the last step, then round.
Frequently asked questions
What is the formula for the Pythagorean theorem?
The formula is a² + b² = c², where a and b are the two shorter sides (legs) of a right-angled triangle and c is the hypotenuse, the longest side opposite the right angle. To find c, use c = √(a² + b²). To find a leg, use a = √(c² − b²). It only works for triangles that contain a 90° angle.
How do you find the hypotenuse with two sides?
Square each of the two shorter sides, add the results together, then take the square root of the total. For legs of 6 and 8: 36 + 64 = 100, and √100 = 10, so the hypotenuse is 10. The hypotenuse will always be longer than either leg, which is a quick way to check the answer.
Does the Pythagorean theorem work on all triangles?
No. It only works on right-angled triangles. For a triangle without a 90° angle, a² + b² will be bigger than c² if the largest angle is acute, and smaller if it is obtuse. For those triangles, use the cosine rule, c² = a² + b² − 2ab·cos C, which becomes Pythagoras when C is 90°.
What are the most common Pythagorean triples?
The most common are 3, 4, 5; 5, 12, 13; 8, 15, 17; and 7, 24, 25. Each is a set of whole numbers that fits a² + b² = c² exactly. Multiplying a triple by any whole number gives another one, such as 6, 8, 10 or 15, 20, 25. Exam questions often use these so the answers come out as whole numbers.
Try it yourself
Open the Pythagoras tool and drag the corners of the right triangle. Watch the squares on each side grow and shrink, and see that the areas of the two smaller squares always add up to the big one on the hypotenuse. Then set the legs to 5 and 12 and check the hypotenuse reads 13.
Véalo por sí mismo, en 3D y gratis.
Pruébalo en el Pythagoras’ Theorem