The most famous theorem in geometry
In any right triangle, the two shorter sides, called legs, and the longest side, the hypotenuse, are linked by a simple equation: a² + b² = c². It lets you find any side from the other two, check whether a corner is truly square, and measure distances you cannot reach directly. This calculator finds the hypotenuse or a missing leg, checks whether three lengths form a right triangle, and adds the angles, area and perimeter.
The formulas
- Hypotenuse: c = √(a² + b²).
- Missing leg: b = √(c² − a²).
- Right-angle check: the triangle is right if and only if c² = a² + b², where c is the longest side.
- Angles: the angle opposite a is arctan(a ÷ b), and the two acute angles add up to 90°.
- Area = a × b ÷ 2, and the height to the hypotenuse = a × b ÷ c.
Worked example: legs of 9 and 12
- c² = 9² + 12² = 81 + 144 = 225.
- c = √225 = 15.
- Angles: arctan(9 ÷ 12) = 36.87° and 90 − 36.87 = 53.13°.
- Area: 9 × 12 ÷ 2 = 54. Perimeter: 9 + 12 + 15 = 36.
- Height to the hypotenuse: 9 × 12 ÷ 15 = 7.2.
The 9-12-15 triangle is the classic 3-4-5 triangle scaled up by three.
Hypotenuse with a = 9 and other values of b
| b | Hypotenuse | Angle opposite a |
|---|---|---|
| 5 | 10.30 | 60.95° |
| 9 | 12.73 | 45.00° |
| 12 | 15.00 | 36.87° |
| 16 | 18.36 | 29.36° |
| 20 | 21.93 | 24.23° |
Practical uses
- Ladders: a 15 ft ladder placed 9 ft from a wall reaches √(15² − 9²) = 12 ft high. Safety guidelines suggest placing the foot about a quarter of the working length away from the wall.
- Squaring a foundation or a deck: mark 3 ft along one side and 4 ft along the other; the diagonal must measure exactly 5 ft. For larger layouts, use 6-8-10 or 9-12-15.
- Screen sizes: a TV’s diagonal is the hypotenuse of its width and height.
- Distances on a grid: walking 3 blocks east and 4 blocks north puts you 5 blocks away as the crow flies.
- Roof rafters: the rafter is the hypotenuse of the run and the rise.
Pythagorean triples
Some triangles have whole-number sides: 3-4-5, 5-12-13, 8-15-17 and 7-24-25, plus all their multiples. Carpenters and surveyors have relied on them for centuries because they give an exact right angle without any measuring tool other than a tape.
Beyond right triangles
When the angle between a and b is not 90°, the law of cosines takes over: c² = a² + b² − 2ab × cos(C). If c² is less than a² + b², the angle opposite c is acute; if it is greater, the angle is obtuse. The right-triangle check in this calculator applies exactly that test.
Units
The theorem works in any unit, as long as all three sides use the same one. Mixing feet and inches is the most common source of wrong answers, so convert everything to inches, or to decimal feet, first.