Advertisement

Pythagorean theorem calculator

Choose what to solve for, then enter the sides you know. The missing side updates as you type. Lengths are reported in metres.

Calculator

A side joined to the right angle. Enter the known leg here when solving for a leg.

The other side joined to the right angle. Used when solving for the hypotenuse.

The longest side, opposite the right angle. Used when solving for a leg.

Hypotenuse c
5

Advertisement

How this calculator works

In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. Solving for the hypotenuse adds the squares of the legs; solving for a missing leg subtracts the known leg square from the hypotenuse square before taking the square root. All sides must be positive, and a leg must be strictly shorter than the hypotenuse, since the other leg would otherwise be zero or imaginary.

Formula

c² = a² + b², so c = √(a² + b²) and b = √(c² - a²).

Worked example

Legs of 3 and 4 give a hypotenuse of √(9 + 16) = 5. With hypotenuse 13 and known leg 5, the missing leg is √(169 - 25) = 12.

Advertisement

Frequently asked questions

Why must the leg be shorter than the hypotenuse?

The hypotenuse is always the longest side of a right triangle. A leg equal to it would force the other leg to zero, and a longer leg gives a negative number under the square root.

Does it work with decimal sides?

Yes. Any positive lengths work, and whole-number triples such as 3-4-5, 5-12-13 and 8-15-17 come out exact.

Does this work for a triangle that is not right-angled?

No. The equality holds only for a right triangle. Other triangles need the law of cosines or another method.

Sources

Advertisement