Pythagorean Theorem: Formula, Worked Examples & Calculator
The Pythagorean theorem is one of the oldest and most useful relationships in mathematics. It connects the three sides of any right-angled triangle and appears in everything from construction and navigation to screen dimensions and physics. Here is a complete guide — from the formula to worked examples and real-world applications.
The Theorem
In a right-angled triangle, the square of the length of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides. Written as a formula:
a² + b² = c²
Where c is the hypotenuse (the longest side, always opposite the 90° angle) and a and b are the two shorter sides, called legs. The theorem holds for every right-angled triangle, regardless of size.
Geometrically, it means: the area of the square drawn on the hypotenuse equals the combined area of the squares drawn on the two legs. This is why the theorem is often shown with three squares attached to the sides of a triangle.
Finding the Hypotenuse
When you know both legs and need the hypotenuse, rearrange to isolate c:
c = √(a² + b²)
Worked Example: The 3-4-5 Triangle
- Known values:
a = 3,b = 4 - Apply the formula:
c = √(3² + 4²) - Square each leg:
9 + 16 = 25 - Take the square root:
√25 = 5 - Result: c = 5
The 3-4-5 triangle is the simplest Pythagorean triple — three whole numbers that satisfy the theorem exactly with no rounding.
Finding a Missing Leg
When you know the hypotenuse and one leg, rearrange to find the missing leg:
b = √(c² − a²)
Worked Example: Hypotenuse 13, One Leg 5
- Known values:
c = 13,a = 5 - Apply the formula:
b = √(13² − 5²) - Square each value:
169 − 25 = 144 - Take the square root:
√144 = 12 - Result: b = 12
This is the 5-12-13 triple — another set of whole-number values that satisfy the theorem perfectly.
Pythagorean Triples
A Pythagorean triple is a set of three positive integers that satisfy a² + b² = c². They are useful for quick mental checks and for problems where exact integer answers are expected.
| a | b | c | Verification |
|---|---|---|---|
| 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 |
Real-World Applications
- Construction squareness check — builders use the 3-4-5 method to verify a corner is exactly 90°. Measure 3 units along one wall and 4 units along the adjacent wall; if the diagonal is 5 units, the corner is square. No protractor needed.
- Screen diagonal — a monitor described as "27 inches" refers to the diagonal. If you know the width is 23.5 in and the height is 13.2 in, verify:
√(23.5² + 13.2²) = √(552.25 + 174.24) ≈ 26.97 in. - Navigation distance — if a ship travels 60 km east and 80 km north, the straight-line distance from start to finish is
√(60² + 80²) = √(3600 + 6400) = √10000 = 100 km. - Ramp and staircase design — given a horizontal run and a required height, the Pythagorean theorem gives the exact length of the ramp or stringer needed.
Word Problem: The Ladder
A ladder 10 ft long leans against a wall. The base of the ladder is 6 ft from the wall. How high up the wall does the ladder reach?
- The ladder is the hypotenuse:
c = 10 - The base distance is one leg:
a = 6 - Find the height (other leg):
b = √(c² − a²) = √(100 − 36) = √64 = 8 - Result: the ladder reaches 8 ft up the wall.
Notice that 6, 8, 10 is just the 3-4-5 triple scaled by 2. Recognising common triples lets you solve these problems in your head.
Need to solve a triangle quickly? Use the DevBench Pythagorean Theorem Calculator — enter any two sides and it instantly computes the third.
Try it yourself
Use the free browser-based Pythagorean Theorem Calculator on DevBench — no signup, runs entirely in your browser.
Open Pythagorean Theorem Calculator