Pythagorean Theorem Calculator

Calculate the hypotenuse or a leg of a right triangle using the Pythagorean theorem. Fill in two of the three sides and leave the third at 0, and the calculator works out the rest.

Hypotenuse (c)
5
Calculated from legs a and b
Leg a
3
Leg b
4

How to use the Pythagorean theorem calculator

  1. Enter the two sides you know in a right triangle.
  2. Leave the field you don't know at 0 — the calculator automatically works out this value.
  3. If you fill in all three fields, the calculator instead checks whether the measurements actually satisfy the Pythagorean theorem.

The Pythagorean theorem

a² + b² = c²

In a right triangle, a and b are the two legs (the sides that meet at the right angle), while c is the hypotenuse — the side opposite the right angle. The hypotenuse is always the longest side in a right triangle.

If you know two of the sides, you can solve the equation for the third: c = √(a² + b²) to find the hypotenuse, or a = √(c² − b²) to find a leg.

Frequently asked questions

What is the Pythagorean theorem used for in practice?

The Pythagorean theorem is used to find distances, check whether a corner is 90 degrees (for example in construction and carpentry), and calculate diagonals in rectangles and other practical measurements.

Can I use this for triangles other than right triangles?

No, the Pythagorean theorem only applies to right triangles — triangles with one corner at exactly 90 degrees. For other triangles you need other methods, such as the law of cosines.

What happens if I fill in all three fields?

Then the calculator uses the numbers to check whether they actually satisfy the Pythagorean theorem, i.e. whether a² + b² actually equals c². This is useful if you want to verify whether a triangle is a right triangle.