Pythagorean Theorem Calculator

Solve for any missing side of a right triangle — hypotenuse or leg — using the Pythagorean theorem.

Select what to solve, then enter the two known sides

Enter two sides to find the missing one

Pythagorean Theorem Calculator

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². This calculator lets you solve for any one unknown side when the other two are provided, covering all three cases: finding the hypotenuse or either leg.

Named after the ancient Greek mathematician Pythagoras, this relationship is one of the most widely applied formulas in mathematics, engineering, physics, and everyday life. Use it to verify right angles, calculate diagonal distances, or find missing measurements in construction and design.

How it works

Given legs a and b, hypotenuse c = √(a² + b²). Given hypotenuse c and leg b, the other leg a = √(c² − b²). Given hypotenuse c and leg a, the other leg b = √(c² − a²). The hypotenuse must always be greater than either individual leg.

Use cases

  • Calculating the diagonal length of a rectangle or screen
  • Determining the length of a ramp or staircase slope
  • Finding the straight-line distance between two GPS coordinates
  • Verifying that a construction corner forms a true right angle
  • Computing the hypotenuse in physics vector problems

Frequently asked questions

How do I calculate the hypotenuse of a right triangle?

Square both legs, add the results, and take the square root: c = √(a² + b²). For example, with legs of 3 and 4, the hypotenuse is √(9 + 16) = √25 = 5. Enter both legs in the calculator and it solves this instantly.

How do I find a missing leg when I know the hypotenuse?

Rearrange the theorem to a = √(c² − b²): square the hypotenuse, subtract the square of the known leg, and take the square root. For example, with a hypotenuse of 13 and one leg of 5, the other leg is √(169 − 25) = √144 = 12. The hypotenuse you enter must be larger than the known leg, otherwise there is no valid right triangle.

Does the Pythagorean theorem work for all triangles?

No, the relationship a² + b² = c² only holds for right triangles, where one angle measures exactly 90 degrees. You can also use it in reverse: if the sides of a triangle satisfy the equation, the triangle must contain a right angle. For non-right triangles, the law of cosines is used instead.

Why must the hypotenuse be longer than either leg?

Because c² equals a² + b², the square of the hypotenuse is always greater than the square of either leg alone, so c must be greater than both a and b. The hypotenuse is the side opposite the right angle and is always the longest side of a right triangle. If you enter a hypotenuse shorter than a leg, no solution exists.

What are real-life uses of the Pythagorean theorem?

It is used to find the diagonal of a rectangle or screen, the length of a ramp or staircase slope, and the straight-line distance between two points or GPS coordinates. Builders also use it to check square corners: if the sides measure 3 and 4 units, the diagonal must measure exactly 5 for the corner to be a true right angle.

Related Calculators