Pythagorean Theorem Explained: Find a Missing Side of a Right Triangle
ByMuhammad Ali•Founder of KruskalCode
13:07
6 min read

Students in the US and UK bump into the Pythagorean theorem whenever right triangles appear in geometry, construction sketches, and applied problems. This article strips the idea down to one dependable relationship between the two legs and the hypotenuse, then shows how to turn two known sides into the missing length — without mixing units.
Explanation
Label the two sides that meet at the right angle as legs a and b, and label the longest side (opposite the right angle) as c. The theorem states c² = a² + b². If you know both legs, add their squares and take the square root to read off the hypotenuse. If you know the hypotenuse and one leg, subtract the known square from c² and take the square root to recover the other leg. The same algebra appears whether you work in feet, inches, metres, or centimetres; only the unit labels change.
Formula
c² = a² + b²; c = √(a² + b²); a = √(c² − b²); b = √(c² − a²) for positive lengths with c greater than each leg when all three are known.
Example
Picture a rectangular corner on a floor plan with legs 6 ft and 8 ft along the walls. The diagonal shortcut across the corner has length √(36 + 64) = 10 ft. In metric, legs 2.5 m and 6.0 m give hypotenuse √(6.25 + 36) ≈ 6.5 m. If you know a 5.0 m hypotenuse along that diagonal and one leg is 3.0 m, the other leg is √(25 − 9) = 4.0 m.
How to use the related calculator
Open the tool page and type any two positive side lengths in the leg a, leg b, and hypotenuse boxes, leaving exactly one box empty for the value you want. Press calculate to see the relationship used, the numeric result, and a quick consistency check. If you ask for a leg from a hypotenuse, make sure the hypotenuse is larger than the leg you already entered — otherwise the triangle cannot close.
Try the related calculator
Open toolFAQ
Why must the hypotenuse be the biggest number?
In a right triangle the right angle sits between the two legs, so each leg is shorter than the slanted hypotenuse. If your inputs break that ordering, the square root step for a leg would not recover a real length.
Does this replace a scientific calculator in class?
It mirrors the same square-root computation your teacher expects. You can still show written steps: square each known side, add or subtract, then root — especially if an exam requires working on paper.
Related articles

About the author
Muhammad Ali. Muhammad Ali is a full-stack developer and founder of KruskalCode. He builds SaaS platforms and automation systems with React and Laravel, and helps teams ship fast, scalable tools.
Need a custom calculator, dashboard, or automation workflow? Reach out to KruskalCode.