Pythagorean Theorem Calculator
a² + b² = c². Solve for hypotenuse or missing leg of a right triangle.
Result
How to use this calculator
- Pick what to solve for.
- Enter the two known sides.
- Read the missing side, area, and perimeter.
About this calculator
The Pythagorean theorem: in a right triangle, a² + b² = c² where c is the hypotenuse (opposite the right angle). Enables solving for any unknown side given the other two. Common Pythagorean triples (integer solutions): 3-4-5, 5-12-13, 8-15-17, 7-24-25. Used everywhere: distance formula, screen diagonal, picture-hanging, surveying.
How it works — the formula
For a right triangle with legs a, b and hypotenuse c:
c² = a² + b²
Solve any side: c = √(a²+b²); a = √(c²−b²); b = √(c²−a²)Pythagoras' theorem (~530 BC, but documented earlier in Babylonian and Indian mathematics) states that the square of the hypotenuse of a right triangle equals the sum of the squares of the other two sides. It works only for right (90°) triangles in Euclidean geometry; the law of cosines generalizes it to arbitrary triangles. The theorem underpins the Euclidean distance formula in 2D and 3D, and through Pythagorean triples (3-4-5, 5-12-13, 8-15-17) it produces integer-side right triangles useful in surveying, framing, and number theory.
Worked examples
- Inputs:
- a = 3, b = 4
- Output:
- c = √(9 + 16) = √25 = 5 (exact)
- Inputs:
- c = 13, b = 5
- Output:
- a = √(169 − 25) = √144 = 12 (5-12-13 triple)
- Inputs:
- Property corner offset by 30 ft east, 40 ft north
- Output:
- Diagonal = √(900 + 1600) = √2500 = 50 ft
Limitations
- Applies only to right triangles in flat (Euclidean) geometry; on a sphere or other curved surface the analogous formula is the spherical law of cosines.
- For non-right triangles use the law of cosines: c² = a² + b² − 2ab·cos(C).
- When inputs have measurement error, the resulting hypotenuse error scales as ~√2 of the leg error; check uncertainty for engineering use.
- Floating-point hypotenuse computation can underflow/overflow for very large or small magnitudes; programming languages provide a "hypot()" function that avoids this.
Pythagorean computation is exact for integer Pythagorean triples; real measurements inherit measurement-tool tolerance.
Frequently asked
When does it apply?+
Famous Pythagorean triples?+
Where does the proof come from?+
TV diagonal?+
Generalizes to higher dimensions?+
Related calculators
More tools you might like
Hand-picked tools that pair well with this one — same audience, same intent.
P = a + b + c. Sum of all three sides.
d = √(Δx² + Δy² [+ Δz²]). Pythagorean distance in the plane or 3-space.
Midpoint = (avg of each coordinate). The point exactly between two points in 2D or 3D.
m = (y₂−y₁) / (x₂−x₁). Returns slope-intercept form y = mx + b.
√n with integer-perfect-square check, simplified surd form, and decimal expansion.
Time-value-of-money solver — solve for Present Value, Future Value, Payment, Periods, or Interest rate given the other four. The HP-12C and TI BA-II Plus core in a free browser tool.