Pythagorean Theorem Calculator

Enter any two sides of a right triangle, leave the unknown blank, and get the third side with exact (√) and decimal answers, plus the rearranged steps.

Leave blank to solve for a

Leave blank to solve for b

Leave blank to solve for c

Advertisement

How to use this calculator

A right triangle has one 90° angle. The side opposite it, the hypotenuse, always the longest side, relates to the two legs by a² + b² = c². Enter any two sides, leave the third empty, and press Calculate.

How it works

Finding the hypotenuse: c = √(a² + b²). Finding a leg: rearrange first, a = √(c² − b²). The calculator checks that your hypotenuse is actually the longest side; if it is not, the triangle cannot be right-angled and it tells you.

a² + b² = c²

Worked example

Example: legs 3 and 4

Step 1, Square: 3² + 4² = 9 + 16 = 25.

Step 2, Root: c = √25 = 5.

Step 3, Check: 9 + 16 = 25 ✓. The classic 3-4-5 triangle.

Common mistakes

  • Adding the sides instead of their squares: c is √(a²+b²), not a+b. For 3 and 4 that is 5, not 7.
  • Forgetting which side is the hypotenuse: c must be the longest. If your “c” is shorter than a leg, re-label the triangle.
  • Using it on non-right triangles: the theorem needs the 90° angle. Without it, use the law of cosines instead.

When to use it

Right triangles hide everywhere: ladder-against-wall problems, diagonals of rectangles and screens, distances on maps and coordinate grids, and anywhere perpendicular directions meet. If you see “right triangle,” “perpendicular,” or “at right angles,” reach for this. See also the Pythagorean theorem beyond triangles.

Frequently asked questions

a² + b² = c², where a and b are the legs of a right triangle and c is the hypotenuse (the side opposite the right angle).

Rearrange first: a = √(c² − b²). Subtract the known leg’s square from the hypotenuse’s square, then take the square root.

Integer sets like (3, 4, 5) and (5, 12, 13) that satisfy a² + b² = c² exactly. They make tidy textbook problems because no rounding is needed.

No. The theorem is equivalent to the right angle, without a 90° corner it does not apply.