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. It states that the square of the hypotenuse — the longest side, opposite the right angle — equals the sum of the squares of the other two sides, the legs: a² + b² = c². It only applies to right triangles.

How to use it

To find the hypotenuse from the two legs, square each leg, add them, and take the square root: c = √(a² + b²). To find a missing leg when you know the hypotenuse and one leg, subtract instead: b = √(c² − a²). The hypotenuse is always the longest side, so a leg must be shorter than it.

Example

A right triangle with legs of 3 and 4 has a hypotenuse of √(3² + 4²) = √25 = 5 — the well-known 3-4-5 triangle. Going the other way, if the hypotenuse is 13 and one leg is 5, the other leg is √(13² − 5²) = √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 used for?+

It finds the length of one side of a right triangle when you know the other two, and it checks whether a triangle has a right angle.

What is the hypotenuse?+

The hypotenuse is the longest side of a right triangle, opposite the right angle. Its square equals the sum of the squares of the two shorter sides.

How do you find a missing leg?+

Subtract the known leg's square from the hypotenuse's square and take the square root: b = √(c² − a²).

What is a 3-4-5 triangle?+

It is a right triangle whose sides are 3, 4 and 5, because 3² + 4² = 9 + 16 = 25 = 5². It is the simplest whole-number example.

Does the theorem work for any triangle?+

No. It only works for right-angled triangles — those with one 90-degree angle.