Skip to content
CalcSolver

Pythagorean Theorem Calculator

Use the Pythagorean theorem (a² + b² = c²) to find a missing side of a right triangle. Find the hypotenuse from the two legs, or find a leg from the hypotenuse and the other leg.

CalculatorEnter values below

Formula

a² + b² = c² → c = √(a² + b²) and a = √(c² − b²)

How it works

  1. 1

    The Pythagorean theorem applies to right triangles: the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides.

  2. 2

    To find the hypotenuse, square both legs, add them, and take the square root.

  3. 3

    To find a missing leg, subtract the square of the known leg from the square of the hypotenuse, then take the square root.

  4. 4

    The hypotenuse is always the longest side, so it must be greater than either leg.

Worked examples

Finding the hypotenuse (3–4–5)

A right triangle has legs of 3 and 4. Find the hypotenuse.

  1. c² = 3² + 4² = 9 + 16 = 25
  2. c = √25 = 5

Answer: c = 5

Finding a leg

The hypotenuse is 13 and one leg is 5. Find the other leg.

  1. leg² = 13² − 5² = 169 − 25 = 144
  2. leg = √144 = 12

Answer: leg = 12

Frequently asked questions

What is the Pythagorean theorem?
For a right triangle, a² + b² = c², where c is the hypotenuse (the side opposite the right angle) and a and b are the two legs.
How do you find a missing leg?
Rearrange the formula: leg = √(c² − other²). Subtract the square of the known leg from the square of the hypotenuse, then take the square root.
What is a Pythagorean triple?
A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c², such as 3‑4‑5, 5‑12‑13 and 8‑15‑17. They make handy right triangles with no rounding.
Which side is the hypotenuse?
The hypotenuse is the longest side and the one opposite the right angle. It is always longer than either leg, so the calculator requires it to exceed the known leg.
Does the Pythagorean theorem work for all triangles?
No — only right triangles (those with a 90° angle). For other triangles you need the law of cosines or other methods.