In short
In a right triangle, the square of the hypotenuse, the side opposite the right angle, equals the sum of the squares of the other two sides: a² + b² = c². So the hypotenuse is the square root of a² + b², and a missing leg is the square root of c² minus the known leg squared. Legs of 3 and 4 give a hypotenuse of exactly 5.
How it works
a² + b² = c² c = √(a² + b²) b = √(c² − a²)
The theorem holds only for right triangles, where c is the side opposite the 90° angle and always the longest side. OpenStax Prealgebra works the classic 3–4–5 triangle: 3² + 4² = 9 + 16 = 25, and √25 = 5.
The calculator also gives the area, half the product of the two legs because they are perpendicular, and the angle opposite leg a, which is atan(a ÷ b).
Worked examples
Legs of 3 and 4
√(3² + 4²) = √25 = 5, OpenStax’s Example 9.22. The area is ½ × 3 × 4 = 6.
A leg of 5 and a hypotenuse of 13
√(13² − 5²) = √144 = 12, as in Example 9.23. 5–12–13 is another right triangle with whole-number sides.
A 10 in brace with equal legs
If both legs are x, then x² + x² = 10², so x = √50 ≈ 7.071 in. Checking with that leg and a 10 in hypotenuse returns the other leg, 7.07107 in, which OpenStax’s Example 9.24 rounds to 7.1 in.
Using this calculator well
- Only for right angles. For other triangles, use the law of cosines.
- Check square corners: builders mark 3 units on one side and 4 on the other; if the diagonal is 5, the corner is square. Multiples like 6–8–10 work too.
- Ladders and ramps: the ladder is the hypotenuse, the height on the wall and the distance from the wall are the legs.
- Distance on a grid between two points is the hypotenuse of a triangle with legs equal to the differences in x and y.
Frequently asked questions
How do I find the hypotenuse?
Square both legs, add them and take the square root. For legs of 6 and 8: 36 + 64 = 100, and √100 = 10. The hypotenuse is always the longest side and is opposite the right angle.
How do I find a missing leg?
Square the hypotenuse, subtract the square of the known leg and take the square root. With a hypotenuse of 17 and a leg of 8: 289 − 64 = 225, so the other leg is 15.
Does the Pythagorean theorem work for any triangle?
No, only for right triangles. If a² + b² is greater than c², the angle opposite c is acute; if it is smaller, the angle is obtuse. That comparison is also a quick test of whether a triangle is right-angled.
How long a ladder do I need to reach 4 m up a wall?
If the foot of the ladder stands 1 m from the wall, the ladder is the hypotenuse: √(4² + 1²) = √17 ≈ 4.12 m. Follow the ladder maker’s guidance on angle and safe use as well.
Sources and methodology
- Prealgebra 2e, 9.3 Use Properties of Angles, Triangles, and the Pythagorean Theorem, OpenStax, Rice University, a² + b² = c²; Example 9.22: legs 3 and 4 → c = 5; Example 9.23: leg 5, hypotenuse 13 → b = 12; Example 9.24: x² + x² = 10² → x ≈ 7.1 (accessed November 24, 2026)
- Prealgebra 2e, C Geometric Formulas, OpenStax, Rice University, Pythagorean theorem; triangle area ½bh (accessed November 24, 2026)
Rounding: Results keep 12 significant digits and are shown to 10; angles to 4 decimal places.
Review status: formulas verified against the cited sources by automated tests; editorial review pending. Version 1.0.0, content updated November 24, 2026.
Changelog
- 1.0.0 · November 24, 2026: First published.
How we build and test calculators
Embed this calculator on your site
Paste this code into your page. The calculator runs in a frame, with no tracking and no cookies, and links back here for the formula and sources.
<iframe src="https://northcalculator.com/embed/en/pythagorean" title="Pythagorean Theorem Calculator" width="100%" height="760" style="border:0" loading="lazy"></iframe>