Pythagorean Theorem Calculator
- Updated
- Formula shown
- Free, no sign-up
Results
Hypotenuse c = 5 for legs 3 and 4
| Step | Working |
|---|---|
| 1. Write the theorem | c² = a² + b² |
| 2. Substitute the legs | c² = 3² + 4² |
| 3. Square and add | c² = 9 + 16 = 25 |
| 4. Take the square root | c = √25 = 5 |
3, 4 and 5 is a Pythagorean triple: whole-number sides of a right triangle.
How to use the Pythagorean theorem calculator
- Choose what to solve for: the hypotenuse, one of the legs, or a check of three sides.
- Enter the known sides. The hypotenuse is the longest side, opposite the right angle.
- Read the answer and the four-line working underneath it. Whole-number answers that form a Pythagorean triple are pointed out, and exact square roots are simplified (for example √50 = 5√2).
The Pythagorean theorem
c = √(a² + b²)
a = √(c² − b²) · b = √(c² − a²)
In any right triangle, the square on the hypotenuse equals the sum of the squares on the two legs. Here a and b are the legs, the two sides that meet at the 90° angle, and c is the hypotenuse. To find c, square both legs, add them and take the square root. To find a leg, subtract the square of the other leg from the square of the hypotenuse, then take the square root. All three lengths must be in the same unit; the answer comes out in that unit too.
The theorem also works backwards (its converse). If three lengths satisfy a² + b² = c², the angle opposite c is exactly 90°. If a² + b² is bigger than c², the largest angle is acute; if it is smaller, that angle is obtuse. The "check" option in the calculator uses this test.
Worked examples
Hypotenuse. With legs of 5 and 12: c² = 5² + 12² = 25 + 144 = 169, so c = √169 = 13.
Missing leg. A 10 ft ladder whose foot is 6 ft from a wall reaches b = √(10² − 6²) = √(100 − 36) = √64 = 8 ft up the wall.
Screen size. TV and monitor sizes are diagonals. A 16:9 screen is a right triangle with legs in the ratio 16 : 9, whose diagonal is √(16² + 9²) = 18.3576 of those units. A 55-inch screen is therefore 55 × 16 ÷ 18.3576 = 47.94 inches wide and 55 × 9 ÷ 18.3576 = 26.96 inches tall.
Squaring a corner with 3-4-5
To check that a deck frame, slab form or wall layout is square, measure 3 units along one side and 4 along the other. If the diagonal between the two marks is exactly 5, the corner is 90°. Larger multiples give more accuracy on big layouts:
| Along one side | Along the other | Diagonal for a square corner |
|---|---|---|
| 3 | 4 | 5 |
| 6 | 8 | 10 |
| 9 | 12 | 15 |
| 12 | 16 | 20 |
Pythagorean triples up to 100
A Pythagorean triple is three whole numbers that fit a² + b² = c². The primitive ones (with no common factor) all come from Euclid's formula, a = m² − n², b = 2mn, c = m² + n², with m > n, no common factor and not both odd. These are all 16 primitive triples with a hypotenuse of 100 or less; multiply any of them by a whole number for more (6-8-10, 9-12-15 and so on).
| a | b | c | From m, n |
|---|---|---|---|
| 3 | 4 | 5 | 2, 1 |
| 5 | 12 | 13 | 3, 2 |
| 8 | 15 | 17 | 4, 1 |
| 7 | 24 | 25 | 4, 3 |
| 20 | 21 | 29 | 5, 2 |
| 12 | 35 | 37 | 6, 1 |
| 9 | 40 | 41 | 5, 4 |
| 28 | 45 | 53 | 7, 2 |
| 11 | 60 | 61 | 6, 5 |
| 16 | 63 | 65 | 8, 1 |
| 33 | 56 | 65 | 7, 4 |
| 48 | 55 | 73 | 8, 3 |
| 13 | 84 | 85 | 7, 6 |
| 36 | 77 | 85 | 9, 2 |
| 39 | 80 | 89 | 8, 5 |
| 65 | 72 | 97 | 9, 4 |
Common mistakes
- Adding when you should subtract. When the hypotenuse is one of the known sides, the missing leg uses c² − a², not c² + a².
- Forgetting the square root. c² = 169 is not the answer; c = 13 is.
- Using it on a triangle without a right angle. For other triangles, use the law of cosines in the triangle calculator.
- Mixing units. Convert feet and inches to one unit before squaring: 5 ft 6 in is 5.5 ft, not 5.6.
The same idea extends to three dimensions: the space diagonal of a box is √(l² + w² + h²), and the distance between two points on a grid is √((x₂ − x₁)² + (y₂ − y₁)²), which the distance calculator works out for you. To solve the angles and area too, use the right triangle calculator.
Frequently asked questions
What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The hypotenuse c is the longest side, opposite the right angle.
How do I find the hypotenuse?
Square each leg, add the results and take the square root. For legs of 5 and 12, c² = 25 + 144 = 169, so the hypotenuse is √169 = 13.
How do I find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse, then take the square root. With a hypotenuse of 10 and a leg of 6, the other leg is √(100 − 36) = √64 = 8.
How can I tell if three sides make a right triangle?
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 7, 24 and 25: 49 + 576 = 625 = 25², so it is a right triangle.
What is a Pythagorean triple?
Three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25. There are 16 primitive triples with a hypotenuse of 100 or less, and any whole-number multiple of a triple (6-8-10) is also a triple.