Skip to main content
Back to Calculators

Pythagorean Theorem Calculator

Solve a right triangle for the hypotenuse or a missing leg

Last updated: 10/13/2026

Solve a right triangle with a² + b² = c². Find the hypotenuse from both legs, or find a missing leg from the other leg and the hypotenuse. For a triangle that is not right-angled, use the law of cosines calculator.

Calculator Inputs

Results

Enter values above to see your results

How to use this calculator

  1. Choose hypotenuse or a missing leg.
  2. Enter the two sides you know. Lengths must be positive.
  3. The hypotenuse has to be longer than either leg.

How the calculation works

The hypotenuse is √(a² + b²). A missing leg is √(c² − a²), and c must be longer than the known leg.

A 3-4-5 triangle checks the formula: √(3² + 4²) = √(9 + 16) = √25 = 5.

Only for right triangles

The right angle is the one between the two legs. The hypotenuse is the side opposite that angle and is the longest side. If no angle is 90 degrees, this formula does not give the third side.

Worked example

Legs 3 and 4

Squares:3² + 4²= 9 + 16 = 25
Hypotenuse:√25= 5

Leg 3 and hypotenuse 5

Missing leg:√(5² − 3²)= √(25 − 9) = 4

Tips & Best Practices

  • •The hypotenuse is always the longest side of a right triangle.
  • •Units cancel as long as every side uses the same unit.

Frequently Asked Questions

How do you find the hypotenuse?

Square each leg, add those squares, and take the square root. For legs 3 and 4, the hypotenuse is 5.

How do you find a missing leg?

Square the hypotenuse, subtract the square of the known leg, and take the square root. The hypotenuse must be longer than the known leg.

Does this work for every triangle?

No. It works when one angle is 90 degrees. Other triangles need a different rule, such as the law of cosines.