Pythagorean Theorem Calculator

Find the hypotenuse, or a missing leg, of any right-angled triangle.

Calculate

Type your numbers and press Calculate — the answer appears with the full step-by-step working.

Answer
c = 13.9283882772
Hypotenuse for legs 13 and 5

Step-by-step working

  1. Square both legs: 13² = 169, 5² = 25
  2. Add: 194
  3. Take the square root: c = √194 = 13.9283882772

Try a worked example — it loads straight into the calculator:

Formula

a² + b² = c²

Worked examples

Legs 3 and 4

  1. Square both legs: 3² = 9, 4² = 16
  2. Add: 25
  3. Take the square root: c = √25 = 5

Answer: c = 5 — Hypotenuse for legs 3 and 4

Hypotenuse 13, leg 5

  1. Rearrange: leg² = c² − a² = 169 − 25 = 144
  2. Take the square root: √144 = 12

Answer: Missing leg = 12 — Hypotenuse 13, known leg 5

Screen: legs 16 and 9

  1. Square both legs: 16² = 256, 9² = 81
  2. Add: 337
  3. Take the square root: c = √337 = 18.3575597507

Answer: c = 18.3575597507 — Hypotenuse for legs 16 and 9

About this calculator

In a right-angled triangle, the square on the hypotenuse equals the sum of the squares on the other two sides — the oldest famous result in mathematics, used daily by builders, navigators and anyone checking whether a corner is truly square. The 3-4-5 triangle is its best-known example: if the sides measure 3, 4 and 5, the corner between the 3 and 4 must be a perfect right angle.

Leg mode rearranges the same formula: leg = √(c² − other leg²). The hypotenuse is always the longest side, so in leg mode it must be the bigger of your two numbers.

How to use it

  1. Pick whether the hypotenuse or a leg is missing.
  2. In hypotenuse mode, a and b are the two legs. In leg mode, a is the hypotenuse and b is the known leg.
  3. Calculate.

Frequently asked questions

Which side is the hypotenuse?

Always the side opposite the right angle — and always the longest. It is the only side that does not touch the right-angle corner.

Does it work for non-right triangles?

No — Pythagoras is exactly true only for right-angled triangles. For other triangles the law of cosines is the general version.