Last updated: October 2026

Pythagorean Calculator

Find a right triangle’s hypotenuse from its two legs.

Enter values above to see results here, or try an example.

Both legs must be positive. You can pick a unit for each leg and for the result.

Try an example

Comprehensive Calculator Guide

The Pythagorean theorem says that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Legs of 3 and 4 give a hypotenuse of 5, because 9 + 16 = 25. Enter both legs in any unit and the hypotenuse appears in the unit you choose.

Using the theorem

c = √(a² + b²): legs 6 and 8 give √100 = 10. The theorem only holds for right triangles; for others use the law of cosines. To find a leg from the hypotenuse, rearrange: b = √(c² − a²). A 5 m ladder with its foot 1.4 m from the wall reaches √(25 − 1.96) = 4.8 m.

Builders square corners with the 3-4-5 rule: mark 3 units along one line and 4 along the other; if the marks are exactly 5 apart, the corner is square. Use 60-80-100 cm or 3-4-5 m on larger layouts.

Pythagorean triples

Whole-number solutions worth knowing: (3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), (20, 21, 29). Any multiple of a triple is also one, so (6, 8, 10) works too.

How to Use

  1. 01Enter the first leg and its unit.
  2. 02Enter the second leg and its unit; the two may differ.
  3. 03Choose the unit for the hypotenuse and read the result.

Formula Used

c = √(a² + b²) | leg = √(c² − a²)

Practical Examples

Example 1: the classic triangle

Legs 3 and 4: √25 = 5.

Example 2: ladder length

To reach 4 m with the foot 1.5 m from the wall: √18.25 = 4.27 m.

Example 3: screen size

A screen 121.8 cm wide and 68.5 cm high has a 139.74 cm diagonal; in inches, about 55.

Important Tips

  • The hypotenuse is always the longest side; if not, check your inputs.
  • A rectangle is square-cornered if its two diagonals are equal.

Common Mistakes to Avoid

  • Adding the legs before squaring instead of squaring each first.
  • Forgetting the final square root.

Frequently Asked Questions

How do I find the hypotenuse?
Square each leg, add them, and take the square root: 5 and 12 give √169 = 13.
How do I find a leg from the hypotenuse?
Subtract the known leg's square from the hypotenuse's square and take the root: √(169 − 25) = 12.
Does it work for any triangle?
No, only right triangles. Use the law of cosines for others.
How do I work out a TV's size?
Enter its width and height as the legs and choose inches for the result.

Read Also

Written and reviewed by the Haseebat team · Last updated: October 2026

Results are estimates for educational purposes and may vary depending on your situation and data sources.