Pythagorean Theorem Calculator
Enter any two sides of a right triangle to find the third. Leave the unknown side blank. Results include all sides, both non-right angles, area, and perimeter.
Enter any 2 of 3 sides. Leave the unknown side blank. c is always the hypotenuse.
Results
| Leg a: | 3 |
| Leg b: | 4 |
| Hypotenuse c: | 5 |
| Angle A (opposite a): | 36.8699° |
| Angle B (opposite b): | 53.1301° |
| Area: | 6 |
| Perimeter: | 12 |
Find hypotenuse c when a = 3, b = 4: c = √(a² + b²) c = √(3² + 4²) c = √(9 + 16) c = √25 c = 5 Verification: a² + b² = c² 3² + 4² = 5² 9 + 16 = 25 25 = 25 ✓
Common Pythagorean Triples
Integer triples (a, b, c) where a² + b² = c²:
| a | b | c | Verification |
|---|---|---|---|
| 3 | 4 | 5 | 3² + 4² = 25 = 5² |
| 5 | 12 | 13 | 5² + 12² = 169 = 13² |
| 8 | 15 | 17 | 8² + 15² = 289 = 17² |
| 7 | 24 | 25 | 7² + 24² = 625 = 25² |
| 20 | 21 | 29 | 20² + 21² = 841 = 29² |
| 9 | 40 | 41 | 9² + 40² = 1681 = 41² |
| 11 | 60 | 61 | 11² + 60² = 3721 = 61² |
| 6 | 8 | 10 | 6² + 8² = 100 = 10² |
| 12 | 16 | 20 | 12² + 16² = 400 = 20² |
| 15 | 20 | 25 | 15² + 20² = 625 = 25² |
The Pythagorean Theorem Explained
For any right triangle with legs a and b and hypotenuse c:
a² + b² = c²
The hypotenuse c is always opposite the right angle (90°) and is always the longest side. The theorem provides a way to calculate the third side whenever two are known.
The Three Cases
| Known sides | Formula | Example |
|---|---|---|
| Legs a and b | c = √(a² + b²) | a=3, b=4 → c = √25 = 5 |
| Leg a and hypotenuse c | b = √(c² − a²) | a=5, c=13 → b = √144 = 12 |
| Leg b and hypotenuse c | a = √(c² − b²) | b=15, c=17 → a = √64 = 8 |
A Geometric Proof Concept
One of the most intuitive proofs: place four congruent right triangles (with legs a, b and hypotenuse c) inside a large square of side (a + b). The triangles form a rotated inner square with side c.
- Large square area = (a + b)² = a² + 2ab + b²
- Four triangles area = 4 × (1/2)ab = 2ab
- Inner square area = large square − triangles = a² + 2ab + b² − 2ab = a² + b²
- But inner square area = c²
- Therefore: a² + b² = c² ✓
Pythagorean Triples Explained
Pythagorean triples are integer solutions to a² + b² = c². The formula to generate them: for any integers m > n > 0, a triple is: a = m² − n², b = 2mn, c = m² + n².
Example: m=2, n=1 → a = 4−1 = 3, b = 4, c = 4+1 = 5. This gives the famous 3-4-5 triple. Multiples of any triple also work: 6-8-10, 9-12-15, and so on.
Real-World Applications
- Construction — squaring a foundation: A 3-4-5 triangle (or 6-8-10, 9-12-15) guarantees a perfect 90° corner. Builders use a chalk line, a tape measure, and the triple to verify that walls meet at exactly 90°.
- Navigation: If you travel 3 km east then 4 km north, your straight-line distance from the start is √(9+16) = 5 km. GPS devices use this in 3D: √(x²+y²+z²).
- Screen diagonal: A monitor 1920×1080 pixels has diagonal √(1920²+1080²) ≈ 2203 pixels. For a 27-inch diagonal and 16:9 aspect ratio, width = 23.5 in, height = 13.2 in.
- Ladders: A 10 ft ladder leaning against a wall with the base 4 ft from the wall reaches √(100−16) = √84 ≈ 9.17 ft up the wall.
- Baseball diamond: The bases form a 90 ft square. The distance from home plate to second base (the diagonal) = √(90²+90²) = 90√2 ≈ 127.3 ft.
Pythagorean Theorem in 3D
The space diagonal of a rectangular box with dimensions l, w, h:
d = √(l² + w² + h²)
This extends naturally: first find floor diagonal df = √(l²+w²), then use it as one leg with h as the other: d = √(df² + h²) = √(l²+w²+h²).
Example: A 12×5×0 box → diagonal = √(144+25) = √169 = 13 ft. A 3D box of 3×4×5 has diagonal √(9+16+25) = √50 ≈ 7.07.
Frequently Asked Questions
What is the Pythagorean theorem?
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the 90° angle) equals the sum of the squares of the other two sides: a² + b² = c². Named after ancient Greek mathematician Pythagoras (570–495 BC), though the relationship was known to Babylonian and Chinese mathematicians much earlier.
How do I find the hypotenuse?
If you know both legs a and b, find c by taking the square root of their squared sum: c = √(a² + b²). Example: legs 6 and 8 → c = √(36 + 64) = √100 = 10. The hypotenuse is always the longest side and always opposite the right angle (90°).
How do I find a missing leg?
Rearrange a² + b² = c². To find leg a, use a = √(c² − b²). To find leg b, use b = √(c² − a²). Example: hypotenuse 13, one leg 5 → other leg = √(169 − 25) = √144 = 12. The hypotenuse must be larger than either leg for a valid triangle.
What are Pythagorean triples?
Pythagorean triples are sets of three positive integers (a, b, c) where a² + b² = c². Examples: (3,4,5), (5,12,13), (8,15,17), (7,24,25). Any multiple of a triple also works: (6,8,10), (9,12,15). There are infinitely many primitive triples (no common factors). They are useful in construction and navigation because they create perfect right angles using only whole numbers.
Does the Pythagorean theorem work in 3D?
Yes. The 3D version is d = √(x² + y² + z²) for the diagonal of a box with dimensions x, y, z. This is applied twice: first find the diagonal of the floor (√(x² + y²)), then treat that as one leg and the height z as the other. In GPS navigation, 3D distance uses this formula. The theorem extends to any number of dimensions.
Related Calculators
- Triangle Calculator — solve any triangle (SSS, SAS, right triangles)
- Slope Calculator — distance between two points uses the Pythagorean theorem
- Circle Calculator — radius and chord calculations use right triangles