The Pythagorean theorem is one of the most useful formulas in math. It lets you find a missing side of a right triangle when you know the other two. Students use it in geometry class, but carpenters, DIYers and anyone measuring a TV screen use it too. This guide explains the Pythagorean theorem formula, shows how to calculate the hypotenuse or a missing leg, and walks through real-life examples.
The Pythagorean theorem formula
In a right triangle (a triangle with one 90° angle), the two shorter sides are called the legs (a and b) and the longest side, opposite the right angle, is the hypotenuse (c).
a² + b² = c²
In words: the square of the hypotenuse equals the sum of the squares of the two legs. The theorem only works for right triangles.
How to find the hypotenuse
When you know both legs, use:
c = √(a² + b²)
- Square each leg.
- Add the two results.
- Take the square root.
Example: a = 3 and b = 4. Then 3² + 4² = 9 + 16 = 25, and √25 = 5. The hypotenuse is 5.
How to find a missing leg
When you know the hypotenuse and one leg, rearrange the formula:
a = √(c² − b²)
Example: the hypotenuse is 13 and one leg is 5. Then 13² − 5² = 169 − 25 = 144, and √144 = 12. The missing leg is 12.
Common Pythagorean triples
A Pythagorean triple is a set of three whole numbers that fit the formula exactly. Memorizing a few saves time on tests and on job sites.
| Leg a | Leg b | Hypotenuse c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 6 | 8 | 10 |
Any multiple of a triple is also a triple: 6-8-10 is just 3-4-5 doubled. That idea is closely related to working with ratios and proportions.
Real-life examples
Checking a square corner (the 3-4-5 rule)
Building a deck, a shed or laying tiles? Measure 3 feet along one side and 4 feet along the other from the same corner. If the diagonal between those two points is exactly 5 feet, your corner is square. For bigger projects, use 6-8-10 or 9-12-15. Once your corners are square, you can confidently calculate the square footage of the room.
How high will a ladder reach?
A 5 m ladder is placed with its base 1.5 m from the wall. The ladder is the hypotenuse, so the height reached is √(5² − 1.5²) = √(25 − 2.25) = √22.75 ≈ 4.77 m.
TV screen size
TV sizes are measured diagonally. A 55-inch TV with a 16:9 ratio is about 47.9 inches wide and 27.0 inches tall. You can check it: 47.9² + 27.0² ≈ 2,294 + 729 = 3,023, and √3,023 ≈ 55.
Distance between two points
On a graph, the distance between (1, 2) and (7, 10) is found the same way. The horizontal difference is 6 and the vertical difference is 8, so the distance is √(36 + 64) = √100 = 10. This is the distance formula, and it comes straight from Pythagoras.
Tips to avoid mistakes
- Make sure the triangle has a right angle. Without one, use other methods such as the law of cosines.
- The hypotenuse is always the longest side. If your answer for c is shorter than a leg, something went wrong.
- Keep the same units for all sides (all in cm, all in inches, etc.). Need to switch units? See our metric vs. imperial conversion cheat sheet.
- Square first, then add. (3 + 4)² is not the same as 3² + 4².
For more geometry, see how to work out the area and circumference of a circle. And if you need Canadian money calculators, from mortgages to savings, visit our Canadian financial calculators.
Pythagorean theorem FAQ
Does the Pythagorean theorem work for all triangles?
No. It only applies to right triangles, which have one 90° angle.
How do I know which side is the hypotenuse?
It is the side opposite the right angle and always the longest of the three sides.
Can the answer be a decimal?
Yes. Most real measurements give decimals. Only Pythagorean triples give whole numbers.
Can I use the theorem in 3D?
Yes. The diagonal of a box is √(length² + width² + height²), which applies the theorem twice.