House of Calculator

Choose the side you want to find, enter the other two and get the answer with the working, plus the area, perimeter and angles.

Results are estimates for planning. Check the figures before you make a financial or health decision.

Embed this calculator on your website

Free to use. Copy the code and paste it into your page. Please keep the link under the calculator in place: it is how we keep the tool free.

The Pythagorean theorem

In a right triangle, the square of the longest side (the hypotenuse, c) equals the sum of the squares of the other two sides:

a² + b² = c²

To find the hypotenuse, use c = √(a² + b²). To find a shorter side, rearrange: a = √(c² − b²) or b = √(c² − a²). The hypotenuse is always the side opposite the right angle and is always the longest.

Worked example

A right triangle has sides a = 3 and b = 4.

StepWorkingResult
Hypotenuse√(3² + 4²) = √(9 + 16)5
Area3 × 4 ÷ 26
Perimeter3 + 4 + 512
Angle Aarctan(3 ÷ 4)36.87°
Angle B90° − 36.87°53.13°

Because 3, 4 and 5 are all whole numbers, this is a Pythagorean triple.

Tips and common mistakes

Use the same unit for every side. Mixing centimetres and metres gives a wrong answer.

When finding a shorter side, the hypotenuse must be the longest number you enter. If it is not, no right triangle exists and the calculator says so.

Common whole-number triples are 3-4-5, 5-12-13, 8-15-17 and 7-24-25, and any multiple of them.

Frequently asked questions

What is the Pythagorean theorem?

For a right triangle, a² + b² = c², where c is the hypotenuse.

Does it work for triangles without a right angle?

No. For other triangles you need the law of cosines, which reduces to the Pythagorean theorem when the angle is 90°.

How do I find a missing leg?

Subtract the square of the known leg from the square of the hypotenuse, then take the square root.

What is a Pythagorean triple?

Three whole numbers that satisfy a² + b² = c², such as 3, 4, 5.

Related calculators