Skip to content
1001 Tools
sr
Math & education

Pythagorean Theorem Calculator

The Pythagorean theorem links the three sides of a right triangle: the square of the hypotenuse equals the sum of the squares of the two legs, a² + b² = c². Enter the two sides you know and this tool finds the third, along with the triangle’s area and perimeter.

Enter two sides to find the third.

How it works

Pick what you are solving for. In “find the hypotenuse” mode you enter the two legs a and b, and the tool computes c = √(a² + b²). In “find a leg” mode you enter the hypotenuse c and one leg a, and it computes the other leg b = √(c² − a²).

A right triangle only exists when the hypotenuse is the longest side, so in leg mode the hypotenuse you enter must be longer than the known leg — otherwise the square root would be of a negative number, and the tool asks you to correct it. All sides must be positive lengths.

Once all three sides are known, the area is ½ × a × b (the two legs are the base and height of a right triangle) and the perimeter is a + b + c. Results are shown to six significant digits, so exact triples like 3-4-5 stay whole while irrational answers like √2 display their decimal.

Practical examples

A classic 3-4-5 triangle

Choose “find the hypotenuse”, enter legs 3 and 4. The hypotenuse is exactly 5, the area is 6 and the perimeter is 12 — the most famous right triangle, and a quick way to check a square corner.

A ladder against a wall

A 5 m ladder (the hypotenuse) has its foot 1.5 m from the wall (one leg). Choose “find a leg”, enter 5 and 1.5, and it reaches 4.77 m up the wall — useful for checking a safe ladder angle.

Diagonal of a TV or room

For a rectangle 120 by 90, the diagonal is the hypotenuse of a right triangle. Enter 120 and 90 in “find the hypotenuse” mode to get 150 — the same math behind screen sizes and room diagonals.

Frequently asked questions

What is the Pythagorean theorem?

For any right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². It only holds for triangles with a 90° angle.

How do I find the hypotenuse?

Square both legs, add them, and take the square root: c = √(a² + b²). Enter the two legs in “find the hypotenuse” mode and the tool does this instantly.

How do I find a missing leg?

Rearrange the formula: b = √(c² − a²). You subtract the known leg’s square from the hypotenuse’s square, then take the root. Use “find a leg” mode and enter the hypotenuse and the known leg.

Why must the hypotenuse be the longest side?

Because it sits opposite the largest (right) angle. If you enter a hypotenuse shorter than or equal to a leg, no such right triangle exists and the square root would be of a negative number, so the tool flags it.

Does the theorem work for any triangle?

No — only right triangles. For triangles without a 90° angle you need the law of cosines, which generalises the Pythagorean theorem by adding a correction term.

What is a Pythagorean triple?

Three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple is also a triple, so 6-8-10 works too. Handy for constructing exact right angles.

How does it calculate area and perimeter?

For a right triangle the two legs are perpendicular, so the area is ½ × a × b. The perimeter is simply the sum of all three sides, a + b + c.

Can I use decimals and different units?

Yes. Enter decimals (a comma or a dot both work) in whatever unit you like — centimetres, metres, inches. The result comes out in the same unit, since the theorem is unit-independent.

Why does an answer sometimes have many decimals?

Many right triangles have an irrational side — for legs of 1 and 1 the hypotenuse is √2 ≈ 1.41421. The tool shows six significant digits; round to whatever precision your problem needs.

Related tools