Overview

In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. This finds the hypotenuse and the two acute angles from the legs.

Enter the lengths of the two shorter sides.

Worked examples

InputsResult
Leg a3Leg b4Hypotenuse: 5Angles: 36.87° and 53.13°
Show 3 more examples
Leg a5Leg b12Hypotenuse: 13Angles: 22.62° and 67.38°
Leg a1Leg b1Hypotenuse: 1.41Angles: 45° and 45°
Leg a8Leg b15Hypotenuse: 17Angles: 28.07° and 61.93°

Hypotenuse by leg b

With the calculator's starting values, the hypotenuse is 5. The table shows how it changes with the leg b.

Leg bHypotenuse
23.61
2.53.91
34.24
3.54.61
4starting value5
4.55.41
55.83
5.56.26
66.71

Other inputs: Leg a: 3. Change them in the calculator above for your own numbers.

How it works

The hypotenuse is √(a² + b²). The angles come from the arctangent of one leg over the other, and they always add up to 90°.

The formula

c = √(a² + b²)
a, bThe legs
cThe hypotenuse

Practical tips

  • Legs of 3 and 4 give a hypotenuse of 5, with angles of 36.87° and 53.13°.
  • Builders use 3-4-5 to check a corner is square: 3 ft along one side and 4 ft along the other should be 5 ft apart.
  • To find a missing leg, use √(c² − a²).

Frequently asked questions

Does it work for any triangle?

No, only right triangles. For others, use the law of cosines.

What's a Pythagorean triple?

Whole numbers that fit exactly, such as 3-4-5, 5-12-13 and 8-15-17.

How do I find a TV's size?

Its diagonal is √(width² + height²).