Pythagorean Theorem Calculator

Solve a² + b² = c² either direction — find the hypotenuse from two legs, or a missing leg from the hypotenuse — with exact form, perimeter and area.

The theorem, both directions

In any right triangle the two legs and the hypotenuse obey a² + b² = c². This calculator solves it both ways: give two legs and it finds the hypotenuse; give a leg and the hypotenuse and it finds the missing leg — refusing, correctly, when the “hypotenuse” entered is not the longest side, because no right triangle can exist that way.

How to use it

  1. Choose what you’re solving for: the hypotenuse, or a missing leg.
  2. Enter the two known sides.
  3. Read the answer, its exact radical form, and the triangle’s perimeter and area.

The formula

c = √(a² + b²) · missing leg = √(c² − a²)

A worked example

Legs of 3 and 4: c = √(9 + 16) = √25 = 5 — the most famous right triangle in mathematics, with perimeter 12 and area 6. Not every answer lands whole: legs of 1 and 1 give √2 ≈ 1.4142, and the calculator shows the exact √ form alongside the decimal so homework can quote whichever the question asks for.

Common questions

Does this work on non-right triangles?
No — the theorem is exclusive to right triangles. For others, the law of cosines generalises it: c² = a² + b² − 2ab·cos(C).
What are Pythagorean triples?
Whole-number solutions like 3-4-5, 5-12-13 and 8-15-17 — and every multiple of them (6-8-10…). They’re the cases where the exact form comes out clean.
Why must the hypotenuse be longest?
It faces the 90° angle, the largest angle, and c² = a² + b² forces c above either leg. The calculator flags impossible inputs instead of returning an imaginary number.