Pythagorean Theorem

Solve any side of a right triangle, drawn to scale, working shown.

About this calculator

Fill any two sides of a right triangle and the third appears with its working — including the honest error when a proposed hypotenuse is shorter than a leg. The triangle redraws to scale as you type, so absurd inputs look absurd immediately.

The theorem that built everything

The relation was known to Babylonian surveyors a millennium before Pythagoras, and it's still on every building site: the 3-4-5 triangle — any triangle with sides in that ratio is exactly right-angled — lets builders square a foundation with nothing but a knotted rope, and the reverse of the theorem is the checker: if a² + b² = c², the angle is right, full stop. The other triples worth recognising on sight are 5-12-13 and 8-15-17. In coordinates the theorem becomes the distance formula (the slope calculator uses it on the rise and run), and for triangles without a right angle, Heron's formula in the area calculator takes over. Diagonal TVs, ladder heights, shortcut lengths across fields — this one equation, forever.

Frequently asked questions

How do I find the hypotenuse?

Square both legs, add, square-root: legs 3 and 4 give √(9+16) = √25 = 5. The hypotenuse is always the longest side, opposite the right angle.

How do I find a missing leg?

Rearrange: leg = √(c² − a²). Hypotenuse 13, leg 5: √(169−25) = 12. The calculator refuses honestly if the hypotenuse isn't the longest side.

What is the 3-4-5 rule builders use?

Mark 3 units along one wall, 4 along the other; if the diagonal is exactly 5, the corner is square. Works at any scale (6-8-10, 9-12-15) — the theorem run in reverse.

Does it work for any triangle?

Only right triangles. For any triangle from three sides, Heron's formula gives the area (in the area calculator), and the law of cosines generalises Pythagoras.