Pythagorean Theorem Calculator — Find a, b, or c in a Right Triangle
Solve for any side of a right triangle using a² + b² = c². Includes Pythagorean triples table, distance formula connection, and real-world construction applications.
Few theorems are as universally known — or as widely used. From architects checking that a corner is truly square, to GPS satellites computing straight-line distances, the Pythagorean theorem is genuinely indispensable. Solve for any missing side with the CalcHub Pythagorean Theorem Calculator.
The Theorem
In any right triangle with legs a and b and hypotenuse c (the side opposite the right angle):
$$a^2 + b^2 = c^2$$
Solve for each side:$$c = \sqrt{a^2 + b^2}$$
$$a = \sqrt{c^2 - b^2}$$
$$b = \sqrt{c^2 - a^2}$$
Worked Examples
Find the hypotenuse: A right triangle has legs of 6 cm and 8 cm. c = √(6² + 8²) = √(36 + 64) = √100 = 10 cm Find a missing leg: A ladder 13 m long leans against a wall. The base is 5 m from the wall. How high does it reach? a = √(13² − 5²) = √(169 − 25) = √144 = 12 m Decimal example: Legs 5 and 7. c = √(25 + 49) = √74 ≈ 8.60Pythagorean Triples
These are whole-number combinations that satisfy a² + b² = c² — extremely useful in construction and carpentry because you can make perfect right angles with just a tape measure.
| a | b | c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 20 | 21 | 29 |
| 9 | 40 | 41 |
| 6 | 8 | 10 |
| 9 | 12 | 15 |
| 12 | 16 | 20 |
The 3-4-5 Method in Construction
To lay a perfectly square corner:
- Mark 3 units from the corner in one direction
- Mark 4 units from the corner in the other direction
- If the distance between those two marks is exactly 5 units, the corner is square
Builders scale this up: 30 cm, 40 cm, 50 cm or 3 m, 4 m, 5 m — whichever suits the project.
Connection to the Distance Formula
The distance formula in 2D is just the Pythagorean theorem in disguise:
$$d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$$
The horizontal leg has length |x₂−x₁|, the vertical leg has length |y₂−y₁|, and the distance is the hypotenuse.
Example: Distance from (1, 2) to (4, 6): d = √((4−1)² + (6−2)²) = √(9 + 16) = √25 = 5In 3D:
$$d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}$$
Converse: Checking Right Angles
If you measure all three sides of a triangle and a² + b² = c² (where c is the longest side), then the angle opposite c is exactly 90°.
Example: Triangle with sides 10, 24, 26. 10² + 24² = 100 + 576 = 676 = 26². It's a right triangle. (This is the 5-12-13 triple scaled by 2.) Non-right check: Triangle 7, 9, 12. 7² + 9² = 49 + 81 = 130 ≠ 144 = 12². Not a right triangle.Does the Pythagorean theorem work in 3D?
Directly, only for 2D right triangles. For 3D, you can extend it: the diagonal of a box with dimensions l, w, h has length √(l² + w² + h²). This follows from applying the theorem twice — once in the base and once vertically.
Is the Pythagorean theorem exact for all right triangles?
In Euclidean (flat) geometry, yes, it's exact. On curved surfaces — like Earth's surface or the geometry near a massive object — the theorem breaks down. GPS systems must account for this since satellite signals travel through slightly non-Euclidean space.
Who proved the Pythagorean theorem first?
Despite the name, Babylonian and Indian mathematicians knew about it centuries before Pythagoras. Clay tablets from around 1800 BCE show Pythagorean triples. There are over 370 known proofs, ranging from Euclid's elegant geometric proof to the U.S. president James Garfield's original 1876 proof using a trapezoid.