How the Pythagorean theorem works
In any right triangle, the square built on the longest side (the hypotenuse, opposite the right angle) has exactly the same area as the two squares on the other two sides combined. Rearranging gives the hypotenuse directly from the two legs.
- a, b — the two legs (the perpendicular sides)
- c — hypotenuse — the side opposite the right angle
More detail
Pythagorean triples
Some right triangles have whole-number sides: 3-4-5 is the smallest, followed by 5-12-13 and 8-15-17. Any multiple of these works too (6-8-10, 9-12-15). Builders use the 3-4-5 rule to check that a corner is a true right angle without a protractor.
Finding a missing leg. If you know the hypotenuse and one leg instead of both legs, rearrange to a = √(c² − b²). This calculator solves for the hypotenuse; for a leg, subtract the squares instead of adding them.
Frequently asked questions
What is the hypotenuse of a 3-4-5 triangle?
c = √(3² + 4²) = √(9 + 16) = √25 = 5. The 3-4-5 triangle is the best-known Pythagorean triple. Enter a = 3, b = 4 above to confirm, and see its area of 6.
How do I find a leg when I know the hypotenuse?
Rearrange the theorem to a = √(c² − b²). For example, with hypotenuse 13 and one leg 5: a = √(13² − 5²) = √(169 − 25) = √144 = 12. This tool solves for the hypotenuse from the two legs.
How do you calculate the area of a right triangle?
The two legs are the base and height, so area = (a · b) ÷ 2. For legs 3 and 4 that's (3 · 4) ÷ 2 = 6. The area is shown alongside the hypotenuse above.
Does the Pythagorean theorem work for any triangle?
No — only for right triangles (one 90° angle). For other triangles you need the law of cosines, c² = a² + b² − 2ab·cos(C), which reduces to the Pythagorean theorem when C = 90°.
What happens if I enter 0 or a negative leg?
No triangle exists, so both the hypotenuse and area show "—". Both legs must be greater than 0.