Pythagorean Theorem Calculator

Find the hypotenuse of a right triangle from the two legs, or find a missing leg from the hypotenuse and one leg.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: June 2026

Hypotenuse c

5

c = √(3² + 4²) = 5

What is the Pythagorean theorem?

The Pythagorean theorem describes the sides of a right-angled triangle: the square of the longest side (the hypotenuse) equals the sum of the squares of the other two sides. Written as a² + b² = c², it lets you find any missing side when you know the other two. It is one of the most useful results in geometry, used in construction, navigation and design.

How it's calculated

For the two shorter sides (the legs) a and b, the hypotenuse is c = √(a² + b²). To find a missing leg instead, rearrange to b = √(c² − a²). This only works for right-angled triangles, and the hypotenuse is always the longest side, opposite the right angle.

Example

A right triangle with legs of 3 and 4 has a hypotenuse of √(9 + 16) = √25 = 5, the classic 3-4-5 triangle. If instead you know the hypotenuse is 13 and one leg is 5, the other leg is √(169 − 25) = √144 = 12.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Choose a mode, then enter the known sides. The result updates as you type.

Find the hypotenuse: enter both legs and get c = √(a² + b²). Find a leg: enter the hypotenuse and one leg to get the other leg = √(c² − a²).

Frequently asked questions

What is the Pythagorean theorem?+

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

How do I find the hypotenuse?+

Take the square root of the sum of the squares of the two legs. See our Square Root Calculator.

How do I find a missing leg?+

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

What is the hypotenuse?+

The longest side of a right triangle, opposite the right angle.

Does it work for any triangle?+

No, only right-angled triangles. For other triangles, see our Triangle Area Calculator.

What is a 3-4-5 triangle?+

A right triangle whose sides are in the ratio 3:4:5, the simplest whole-number example.

What are Pythagorean triples?+

Sets of whole numbers that satisfy a² + b² = c², such as 3-4-5 and 5-12-13.

Can the legs be decimals?+

Yes, the formula works with any positive numbers.