HomeMath › Pythagorean Theorem Calculator

Pythagorean Theorem Calculator

Enter any two sides of a right triangle — two legs, or one leg and the hypotenuse — and get the third side with the full a² + b² = c² substitution written out, plus the triangle’s area, perimeter, and angles.

Missing side
Side a / b / c
Area (ab ÷ 2)
Perimeter
Angle α / β

Step-by-step solution

The theorem in one line

In every right triangle, the square built on the hypotenuse equals the two leg squares combined: a² + b² = c². It works in both directions — solve for the hypotenuse by adding squares, or for a missing leg by subtracting (b = √(c² − a²)). The converse is just as useful: if three lengths satisfy the equation, the triangle must contain a right angle, which is how a 3-4-5 string squares a fence corner. The only rule: the hypotenuse is always the longest side, so a leg can never equal or exceed c.

How it’s calculated

Hypotenuse: c = √(a² + b²). Missing leg: b = √(c² − a²), requiring c > a. Area = ab ÷ 2, perimeter = a + b + c, and angles α = arctan(a/b), β = 90° − α. Steps show each substitution exactly as you would write it by hand.

Results update as you type and are for education, not professional advice — double-check any number that matters.

Worked example

Legs 3 and 4: c² = 3² + 4² = 9 + 16 = 25, so c = √25 = 5. Area = 3 × 4 ÷ 2 = 6, perimeter = 12, angles 36.87° and 53.13°. Going the other way with a = 5 and c = 13: b = √(169 − 25) = √144 = 12.

Common mistakes

  • Solving a leg by adding the squares — when c is known you subtract: b² = c² − a².
  • Entering a hypotenuse shorter than a leg — impossible, and the calculator flags it.
  • Using the theorem on a triangle without a right angle — use the law of cosines (triangle calculator) instead.

Where it is used

  • Finding diagonal distances — TV screens, room diagonals, shortest paths.
  • Squaring corners in construction with the 3-4-5 method.
  • Physics and navigation — combining perpendicular components into a magnitude.

Frequently asked questions

How do I find a leg instead of the hypotenuse?

Enter one leg and the hypotenuse, leaving the other leg blank: b = √(c² − a²). With a = 5 and c = 13, b = √(169 − 25) = 12. The steps panel writes out the subtraction form automatically.

Why must the hypotenuse be the longest side?

It faces the 90° angle, the largest angle in the triangle, and the longest side is always opposite the largest angle. Algebraically, c² = a² + b² forces c to exceed both a and b.

Does the theorem work in 3D?

Yes, applied twice: a box diagonal is √(l² + w² + h²) — the 2D diagonal √(l² + w²) becomes a leg of a second right triangle with the height. Our distance calculator does this directly.

What are Pythagorean triples?

Whole-number solutions like 3-4-5, 5-12-13, 8-15-17, and 7-24-25 — plus every multiple of them (6-8-10, 10-24-26). They let you verify right angles without any square roots.

Who proved it?

It is named for Pythagoras (6th century BC), but Babylonian tablets list triples a thousand years earlier. Hundreds of proofs exist, including one by US President James Garfield using a trapezoid.