How to Use the Pythagorean Theorem to Find a Missing Side
By the SnapCalculations team · Updated 5 Nov 2026
The short answer
In a right triangle, a2 + b2 = c2, where c is the hypotenuse (the longest side, opposite the right angle). To find c, square the two shorter sides, add them and take the square root. To find a shorter side, subtract instead: b = √(c2 − a2).
What the theorem says
The Pythagorean theorem (often called Pythagoras' theorem in the UK) links the three sides of any right-angled triangle. The two sides that form the right angle are the legs, a and b. The side opposite the right angle is the hypotenuse, c, and it's always the longest side.
a² + b² = c²
Only for right-angled triangles. c must be the hypotenuse
The theorem only works for triangles with a 90° angle. For other triangles, you need the law of cosines or other trigonometry.
Finding the hypotenuse
- 1Square both legs: multiply each by itself.
- 2Add the two squares.
- 3Take the square root of the total. That's c.
Example 1: the classic 3-4-5 triangle
A right triangle has legs of 3 cm and 4 cm. How long is the hypotenuse?
- 32 + 42 = 9 + 16 = 25.
- c = √25 = 5.
Answer: 5 cm
Try it in the calculatorExample 2: an answer that isn't a whole number
The legs are 5 and 7. Find the hypotenuse.
- 52 + 72 = 25 + 49 = 74.
- c = √74. 74 has no square factor, so √74 is already in its simplest form.
- √74 ≈ 8.602.
Answer: c = √74 ≈ 8.602
Try it in the calculatorFinding a missing leg
- 1Square the hypotenuse and the known leg.
- 2Subtract the leg's square from the hypotenuse's square.
- 3Take the square root of the result.
Finding the hypotenuse? Add. Finding a shorter side? Subtract. If your “shorter side” comes out longer than the hypotenuse, you've added when you should have subtracted.
Example 3: a missing leg
A right triangle has a hypotenuse of 13 and one leg of 5. Find the other leg.
- 132 − 52 = 169 − 25 = 144.
- b = √144 = 12.
Answer: 12
Try it in the calculatorExample 4: how high does a ladder reach?
A 5 m ladder leans against a wall with its foot 1.5 m from the wall. How high up the wall does it reach?
- The ladder is the hypotenuse (5 m) and the ground distance is one leg (1.5 m).
- 52 − 1.52 = 25 − 2.25 = 22.75.
- Height = √22.75 ≈ 4.77.
Answer: About 4.77 m up the wall
Try it in the calculatorExample 5: a TV screen's size
A TV screen is 48 inches wide and 27 inches tall. Screen sizes are measured on the diagonal. What size is it?
- The diagonal is the hypotenuse: 482 + 272 = 2,304 + 729 = 3,033.
- Diagonal = √3,033 ≈ 55.07.
Answer: About 55 inches
Try it in the calculatorChecking whether a triangle has a right angle
The theorem works backwards too. Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle has a right angle. For sides 6, 8 and 10: 36 + 64 = 100 = 102, so it's a right triangle. For sides 5, 6 and 8: 25 + 36 = 61, which isn't 64, so it isn't.
Builders use this to check corners are square: measure 3 units along one wall and 4 along the other, and the diagonal between those points should be exactly 5. Sets of whole numbers that fit, like 3-4-5, 5-12-13 and 8-15-17, are called Pythagorean triples.
Common mistakes to avoid
- Putting the hypotenuse in the wrong place. c is always the side opposite the right angle and must be on its own in a2 + b2 = c2.
- Adding when finding a leg. To find a shorter side, subtract the squares.
- Forgetting the square root. 32 + 42 = 25, but the side is 5, not 25.
- Writing √(a2 + b2) as a + b. √(9 + 16) is 5, not 3 + 4 = 7.
- Using it on a triangle without a right angle.
Solve it instantly
Our Pythagorean theorem calculator finds the hypotenuse or a missing leg, gives the exact answer in simplest radical form where there is one, and also shows the triangle's area, perimeter and angles, with the working.
Frequently asked questions
Does the Pythagorean theorem work for every triangle?
No, only for right-angled triangles. For other triangles, use the law of cosines: c2 = a2 + b2 − 2ab·cos(C).
Does it matter which leg is a and which is b?
No. The two legs can be swapped freely. Only the hypotenuse, c, has to go in its own place.
How do I find the distance between two points with it?
The horizontal and vertical gaps between the points are the legs. For (1, 2) and (4, 6), the gaps are 3 and 4, so the distance is √(9 + 16) = 5.
Who was Pythagoras?
A Greek mathematician from around 500 BC whose name the theorem carries. The relationship itself was known and used earlier, including in ancient Babylon.