Skip to content

Pythagorean Theorem Calculator

Choose which side to find, enter the other two and get the answer with each step of a² + b² = c² written out, plus the triangle's angles, area and perimeter.

MathUpdated Free · No sign-up

How to use the Pythagorean Theorem Calculator

  1. Choose Solve for.
  2. Read your answer in the results panel. It updates as you type, and the breakdown, step-by-step working and any charts or tables appear below it.
  3. Use Share link to save or send the exact calculation, or Copy to paste the results elsewhere.

The theorem

In any right triangle, the square on the hypotenuse equals the sum of the squares on the other two sides:

a² + b² = c²

Here a and b are the legs, the two sides that meet at the right angle, and c is the hypotenuse, the longest side opposite the right angle. The theorem only applies to right triangles. For any other triangle, use the law of cosines in the triangle calculator.

Rearranged for each side

Find Formula
Hypotenuse c c = √(a² + b²)
Leg a a = √(c² − b²)
Leg b b = √(c² − a²)

Worked examples

Hypotenuse: legs of 3 and 4 give c² = 9 + 16 = 25, so c = 5.

Missing leg: a 13 ft ladder with its foot 5 ft from a wall reaches b = √(13² − 5²) = √(169 − 25) = √144 = 12 ft up the wall.

Non-whole answers: legs of 1 and 1 give c = √2 ≈ 1.414214. When the square under the root has a square factor, the calculator also shows the exact simplified form, for example √50 = 5√2.

Pythagorean triples

Some right triangles have whole-number sides. These sets are called Pythagorean triples. The common ones are worth recognising: 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Any multiple also works, so 6-8-10 and 9-12-15 are right triangles too. Builders use the 3-4-5 rule to check that a corner is square: mark 3 units along one wall and 4 along the other; if the diagonal is exactly 5, the angle is 90°.

Other uses

  • The straight-line distance between two points on a map or graph is the hypotenuse of a triangle whose legs are the horizontal and vertical differences.
  • A TV’s screen size is its diagonal. A 16:9 screen with a 55-inch diagonal is about 47.9 by 27.0 inches.
  • If a² + b² is bigger than c², the angle opposite c is acute; if smaller, it is obtuse.

Frequently asked questions

Which side is the hypotenuse?

The hypotenuse is the side opposite the right angle. It is always the longest side of a right triangle.

Can a leg be longer than the hypotenuse?

No. Since c² = a² + b², c is always longer than either leg. If your numbers say otherwise, the calculator shows an error.

Does the Pythagorean theorem work for all triangles?

Only for right triangles. For other triangles the law of cosines, c² = a² + b² − 2ab·cos C, takes its place; when C = 90° the extra term is zero and you get Pythagoras back.