Pythagorean Theorem Calculator

Calculate any side of a right triangle using the Pythagorean theorem

About This Tool

You're hanging a TV bracket and need the diagonal distance from the lower corner of the studs to the upper corner of the screen, or you're framing a roof and have rise and run but need the rafter length. The theorem itself is high-school stuff, but reaching for a calculator app to compute a square root of a sum of squares is friction that doesn't need to exist.

Give it any two sides — both legs, or a leg and the hypotenuse — and the third comes back. The math handles the inversion (subtracting one square from another to find the missing leg) without you having to remember which value goes where. Works in any unit system as long as you're consistent.

The theorem: in a right triangle with legs a and b and hypotenuse c, a² + b² = c². The proof has been done literally hundreds of ways since antiquity — geometric tilings, similar-triangle arguments, algebraic rearrangements. The relationship is one of the deepest in elementary geometry and shows up everywhere from surveying to computer graphics to GPS distance calculations. Inversions: if you know c and one leg, the other leg = sqrt(c² − a²). If both legs are equal (an isoceles right triangle), the hypotenuse is a√2. The 45-45-90 triangle has sides in the ratio 1:1:√2; the 30-60-90 triangle has sides 1:√3:2.

A worked example: you're building a wheelchair ramp that needs to rise 30 inches over a horizontal run of 360 inches (a 1:12 slope, ADA-compliant). The actual ramp surface (hypotenuse) is sqrt(30² + 360²) = sqrt(900 + 129,600) = sqrt(130,500) ≈ 361.25 inches. So you need a ramp board about 30 feet 1 inch long. Without the theorem you'd assume 360 inches works for the surface length and end up short. Many real construction errors trace back to confusing the run with the surface length on sloped applications.

Where this calculator stops being useful: non-right triangles. Pythagoras only works with one 90-degree angle in the mix. For oblique triangles, you need the Law of Cosines: c² = a² + b² − 2ab·cos(C), where C is the angle opposite c. The Law of Cosines reduces to Pythagoras when C = 90° because cos(90°) = 0. Common 3D applications also need Pythagoras applied twice — first to find the diagonal of the base, then to find the spatial diagonal using that diagonal and the height. Pythagorean triples (integer side combinations like 3-4-5, 5-12-13, 8-15-17) make handy mental math anchors and are useful for verifying that an answer is reasonable; if you input two legs and get a hypotenuse that doesn't approximately match the nearest familiar triple, you may have entered something wrong.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions