This Pythagorean theorem calculator finds the missing side of a right triangle. Choose whether you need the hypotenuse or one of the legs, enter the two sides you know and get all three sides, the area and the perimeter.
Formula
a² + b² = c². Hypotenuse: c = √(a² + b²). Leg: a = √(c² - b²) or b = √(c² - a²).
How it works
In a right triangle, the square of the hypotenuse (the side opposite the 90° angle) equals the sum of the squares of the two legs. Choose which side is missing, fill in the other two in the same unit and the calculator returns all three sides, the area and the perimeter. The field of the unknown side is ignored. When you look for a leg, the hypotenuse must be longer than the known leg.
How the Pythagorean theorem works
In any right triangle, a² + b² = c², where a and b are the legs (the two sides that form the 90° angle) and c is the hypotenuse, the longest side, opposite the right angle. Knowing any two sides is enough to find the third.
To find the hypotenuse, add the squares of the legs and take the square root: c = √(a² + b²). To find a leg, subtract the square of the known leg from the square of the hypotenuse: b = √(c² - a²). That is why the hypotenuse must always be longer than either leg.
Worked examples
Hypotenuse: legs of 3 and 4. c = √(9 + 16) = √25 = 5. The triangle's area is 3 × 4 ÷ 2 = 6 and its perimeter 3 + 4 + 5 = 12. Missing leg: hypotenuse 13 and one leg 5. b = √(169 - 25) = √144 = 12.
Real life: a 2.6 m ladder leans against a wall with its foot 1 m away from the wall. How high does it reach? Choose leg b, enter a = 1 and c = 2.6: b = √(6.76 - 1) = √5.76 = 2.4 m. Builders use the same idea, the 3-4-5 rule, to check that corners are square.
Pythagorean triples and special triangles
Some whole-number sets fit the theorem exactly and are worth memorizing: 3-4-5, 5-12-13, 8-15-17 and 7-24-25, plus their multiples such as 6-8-10. They show up constantly in exam problems.
A right isosceles triangle with legs of 1 has a hypotenuse of √2 ≈ 1.4142, which is also the diagonal of a unit square. For any rectangle, the diagonal is √(length² + width²), useful for TV screens, door frames and room layouts. To work out the area of the whole shape, use the area calculator.
Common mistakes
Mixing up the hypotenuse and a leg is the classic error. The hypotenuse is always opposite the right angle and always the longest side. If you get a leg longer than the hypotenuse, or the calculator returns nothing, check which value you typed as c.
Keep all sides in the same unit, and remember that the theorem only applies to right triangles. For other triangles you need the law of cosines. Square roots of non-perfect squares are irrational, so the result is rounded; the exponent and root calculator shows more decimals if you need them.
Frequently Asked Questions
- Does the Pythagorean theorem work for any triangle?
- No, only for right triangles (one 90° angle). For other triangles use the law of cosines: c² = a² + b² - 2ab·cos(C).
- How do I find the hypotenuse?
- Square both legs, add them and take the square root. With legs 3 and 4: √(9 + 16) = √25 = 5.
- How do I find a missing leg?
- Square the hypotenuse, subtract the square of the known leg and take the square root. With hypotenuse 13 and leg 5: √(169 - 25) = 12.
- How do I check if a triangle is a right triangle?
- Square the longest side and compare it with the sum of the squares of the other two. If they are equal, the triangle has a right angle. 6, 8 and 10 pass the test because 36 + 64 = 100.
- What is the 3-4-5 rule in construction?
- Measure 3 units along one wall and 4 along the other. If the distance between the two marks is exactly 5, the corner is a true 90° angle.