Skip to content
Omnikalc

Pythagorean theorem calculator: hypotenuse, missing side and right triangle check

Find the hypotenuse or a missing leg of a right triangle with a² + b² = c², along with its angles, area and perimeter.

Updated on
Your inputs
What do you want to do?

Value out of range

Value out of range

Value out of range

Results

Hypotenuse c

15.00

Leg b

12.00

Angle opposite a
36.87 °
Angle opposite b
53.13 °
Area
54.00
Perimeter
36.00
Height to the hypotenuse
7.20
c² − (a² + b²)
0.00

Hypotenuse for other values of b

Hypotenuse cAngle opposite a
b = 5 current10.3060.95
b = 9 current12.7345.00
b = 12 current15.0036.87
b = 16 current18.3629.36
b = 20 current21.9324.23

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

  1. c² = 9² + 12² = 81 + 144 = 225.
  2. c = √225 = 15.
  3. Angles: arctan(9 ÷ 12) = 36.87° and 90 − 36.87 = 53.13°.
  4. Area: 9 × 12 ÷ 2 = 54. Perimeter: 9 + 12 + 15 = 36.
  5. 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.

Frequently asked questions

What is the Pythagorean theorem?

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². With legs of 9 and 12, c = √(81 + 144) = √225 = 15.

How do I find a missing leg?

Rearrange the formula: b = √(c² − a²). A 15 ft ladder with its foot 9 ft from a wall reaches √(225 − 81) = √144 = 12 ft up the wall.

How do I check whether a corner is square?

Use the 3-4-5 rule. Measure 3 units along one side and 4 along the other: if the diagonal between those two marks is exactly 5, the angle is 90 degrees. Builders scale it up to 6-8-10 or 9-12-15 for more accuracy.

Does the theorem work for any triangle?

No, only for right triangles. For other triangles, the law of cosines generalizes it: c² = a² + b² − 2ab × cos(C). When C is 90 degrees, the cosine is zero and you are back to a² + b² = c².

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.