Hypotenuse Calculator icon

Hypotenuse Calculator

The hypotenuse of a right triangle is c = √(a² + b²). With legs a = 3 and b = 4: c = √(9 + 16) = √25 = 5. To find a missing leg instead, use a = √(c² − b²).

Find the hypotenuse of a right triangle from its two legs, or a missing leg from the hypotenuse — with the working, the angles, the area and the perimeter.

How to find the hypotenuse

The hypotenuse is the longest side of a right triangle, opposite the 90° angle. The Pythagorean theorem links it to the two other sides (the legs):

a² + b² = c²  so  c = √(a² + b²)

  1. Square each leg.
  2. Add the two squares.
  3. Take the square root of the sum.

Example: legs of 6 and 8 → 36 + 64 = 100 → c = √100 = 10.

Common Pythagorean triples

abc
345
51213
81517
72425
202129

Real-world uses

More maths tools: the quadratic formula calculator and the scientific calculator.

Special right triangles

TriangleSide ratioExample
45° – 45° – 90°1 : 1 : √2Legs 5 and 5 → hypotenuse 7.071
30° – 60° – 90°1 : √3 : 2Short leg 4 → long leg 6.928, hypotenuse 8

Finding the hypotenuse from one side and an angle

If you know one leg and an acute angle instead of both legs, use trigonometry: c = a ÷ sin(α), where α is the angle opposite leg a, or c = b ÷ cos(α). With a = 5 and α = 30°: c = 5 ÷ 0.5 = 10. The scientific calculator gives sin and cos values.

Worked example: a roof rafter

A roof rises 2.4 m over a horizontal run of 4.5 m. The rafter length is the hypotenuse: √(2.4² + 4.5²) = √(5.76 + 20.25) = √26.01 = 5.1 m, before adding the overhang. The roof angle is atan(2.4 ÷ 4.5) = 28.1°. Builders use the same calculation for stair stringers and wheelchair ramps.

The distance formula between two points is the same theorem applied to coordinates — see the distance formula calculator. To read values from engineering tables, try the interpolation calculator.

Sources & standards

Frequently asked questions

How do I calculate the hypotenuse?

Square both legs, add them and take the square root: c = √(a² + b²). For legs 5 and 12: √(25 + 144) = √169 = 13.

How do I find a missing leg of a right triangle?

Rearrange the Pythagorean theorem: a = √(c² − b²). With hypotenuse 13 and leg 5: √(169 − 25) = √144 = 12.

Can the hypotenuse be shorter than a leg?

No. The hypotenuse is always the longest side of a right triangle, because c² is the sum of two positive squares.

Does the Pythagorean theorem work for all triangles?

Only for right triangles (one 90° angle). For other triangles, use the law of cosines: c² = a² + b² − 2ab·cos(C).

What is the 3-4-5 rule?

It is the simplest Pythagorean triple. Builders use it to check square corners: if two sides measure 3 and 4 units, the diagonal must be exactly 5.