Pythagorean Theorem Calculator

Solve a² + b² = c² for the missing side of a right triangle, given the other two.

The theorem, in plain terms

For any right triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². Given any two sides, the third follows directly — add or subtract the squares, then take the square root.

Why it only works for right triangles

The Pythagorean theorem is a special case of the more general law of cosines, which applies to any triangle. When the angle between two sides happens to be exactly 90°, the cosine term in that general formula drops to zero, leaving exactly a²+b²=c².

The hypotenuse is always the longest side and is always opposite the right angle. If you're solving for a leg (a or b) rather than the hypotenuse, make sure the known hypotenuse value is actually longer than the known leg — otherwise no valid triangle exists.

Common questions

What's a "Pythagorean triple"?

A set of three whole numbers that satisfy a²+b²=c² exactly, like 3-4-5 or 5-12-13. They're useful as quick mental-math reference points and show up often in textbook problems.

Can this be used for non-right triangles?

No — for any triangle without a 90° angle, use the law of cosines instead, which is exactly what our Triangle Calculator does.

More Math Calculators

Pick another tool to jump straight to it.