Pythagorean Theorem Calculator

Solve a² + b² = c² for any missing side of a right triangle. Choose what to find, enter the two sides you know, and get the missing side plus the perimeter, area, and angles.

Hypotenuse c 0
Perimeter 0
Area 0
Acute angles

How the Pythagorean theorem works

In any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs:

a² + b² = c²

To find the hypotenuse, take the square root of the sum of the squared legs: c = √(a² + b²). With legs of 3 and 4, c = √(9 + 16) = √25 = 5 — the classic 3-4-5 triangle.

Finding a missing leg

When you know the hypotenuse and one leg, rearrange the formula:

a = √(c² − b²)

The hypotenuse must be the longest side, so c has to be larger than the known leg. If it isn't, the three lengths can't form a right triangle and the calculator flags it.

Pythagorean triples

Whole-number side sets like 3-4-5, 5-12-13, and 8-15-17 are called Pythagorean triples. Any multiple works too, so 6-8-10 and 9-12-15 are also triples — builders use the 3-4-5 rule to square up corners without a protractor.

Frequently asked questions

What is the Pythagorean theorem?

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². It only applies to right triangles.

How do you find the hypotenuse?

Square both legs, add them, and take the square root: c = √(a² + b²). For legs of 3 and 4, that is √(9 + 16) = √25 = 5. The hypotenuse is always the longest side of a right triangle.

How do you find a missing leg?

Rearrange the theorem to a = √(c² − b²). Subtract the square of the known leg from the square of the hypotenuse, then take the square root. The hypotenuse must be longer than the leg you already have, or no right triangle exists.

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. Any multiple of a triple — like 6-8-10 — is also a triple, which makes these handy for quick right-angle checks in construction.

Can I use the theorem for any triangle?

No. The Pythagorean theorem only works for right triangles — those with a 90° angle. For other triangles you need the law of cosines, which generalizes the theorem to any angle.

Disclaimer: This calculator applies only to right triangles. Results are rounded for display and are provided for educational purposes.