Pythagorean Theorem Calculator
Find the missing side of a right triangle — hypotenuse or either leg — using a² + b² = c².
How it works
c = √(a² + b²) · a = √(c² − b²)
In any right triangle the two legs a and b and the hypotenuse c satisfy a² + b² = c². Knowing any two sides pins down the third: add the squared legs and take the square root for the hypotenuse, or subtract a squared leg from the squared hypotenuse for the other leg. It only works if the triangle has a 90° angle.
Worked example
Legs of 3 and 4: c = √(3² + 4²) = √(9 + 16) = √25 = 5 — the classic 3-4-5 triangle. Going the other way, with c = 5 and b = 4, the missing leg is √(25 − 16) = 3.
Frequently asked questions
Why must the hypotenuse be the longest side?
Because c² equals a² plus something positive, c² is bigger than either leg squared. That’s also why the calculator rejects a hypotenuse shorter than or equal to a leg.
Does this work for any triangle?
No — only right triangles. For others, use the law of cosines (c² = a² + b² − 2ab·cos C), which reduces to the Pythagorean theorem when the angle is 90°.
What are Pythagorean triples?
Whole-number side sets like 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple (6-8-10, for instance) is also a right triangle, which is why builders check corners with a 3-4-5 rope.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.