Skip to content

Pythagorean Theorem Calculator: Find the Missing Side

Find any missing side of a right triangle with a² + b² = c². Learn the formula, how to solve for a leg or the hypotenuse, and see real-world worked examples.

4 min read

The Pythagorean theorem is probably the best-known formula in mathematics. It says that in a right triangle, the square on the longest side equals the sum of the squares on the other two. Our Pythagorean theorem calculator uses it to find whichever side you leave blank. This guide explains the formula, shows how to rearrange it for each side, and gives everyday examples of where it helps.

How to use the calculator

  1. Enter the two sides you know.
  2. Leave the missing side blank.
  • Legs a and b are the two sides that meet at the right angle.
  • Hypotenuse c is the longest side, opposite the right angle.

With a = 3 and b = 4 and c left blank, the calculator returns a, b, c = 3, 4, 5. With a = 5 and c = 13 and b blank, it returns b = 12.

The formula

It only applies to right triangles, those with one 90° angle.

Finding the hypotenuse:

For legs 3 and 4: c = √(9 + 16) = √25 = 5.

Finding a leg:

For hypotenuse 13 and leg 5: b = √(169 − 25) = √144 = 12.

Notice that you add when finding the hypotenuse and subtract when finding a leg. Mixing these up is the most common mistake.

Why it works

There are hundreds of proofs. One of the simplest arranges four copies of the triangle inside a large square with side a + b. The empty space in the middle is a square of side c, so the area of the big square is c² + 4 × (ab ÷ 2) = c² + 2ab. But the big square's area is also (a + b)² = a² + 2ab + b². Setting these equal and cancelling 2ab leaves a² + b² = c².

Pythagorean triples

When all three sides are whole numbers, they form a Pythagorean triple.

TripleCheck
3, 4, 59 + 16 = 25
5, 12, 1325 + 144 = 169
8, 15, 1764 + 225 = 289
7, 24, 2549 + 576 = 625
20, 21, 29400 + 441 = 841

Any multiple of a triple is also a triple, so 6, 8, 10 and 30, 40, 50 work too.

Real-world examples

Ladder against a wall. A 6 m ladder stands with its foot 2 m from the wall. How high does it reach? Height = √(36 − 4) = √32 ≈ 5.66 m.

TV screen size. A screen is 121 cm wide and 68 cm tall. Its diagonal is √(121² + 68²) = √(14,641 + 4,624) = √19,265 ≈ 138.8 cm, or about 55 inches.

Squaring a corner. Mark 3 ft along one wall and 4 ft along the other. If the diagonal measures exactly 5 ft, the corner is square. Builders scale this up to 6, 8, 10 or 9, 12, 15 for larger rooms.

Shortest walking route. Cutting diagonally across a rectangular park 80 m by 60 m saves walking 140 m around the edge: the diagonal is √(6,400 + 3,600) = 100 m.

The distance formula

The distance between two points on a graph is a Pythagorean calculation. The horizontal and vertical gaps are the legs:

From (1, 2) to (4, 6): d = √(9 + 16) = 5. The distance calculator and slope calculator both use this.

Checking for a right angle

The theorem works backwards too. If three sides satisfy a² + b² = c², the triangle has a right angle. If a² + b² is greater than c², the largest angle is acute; if it is smaller, the largest angle is obtuse. The triangle calculator applies this test to any three sides, and the right triangle calculator also gives the angles.

Tips

  • Always identify the hypotenuse first: it is opposite the right angle and must be the longest side.
  • Keep all sides in the same unit.
  • Square roots of non-perfect squares are irrational, so round only at the end. The root calculator helps with awkward roots.

Frequently asked questions

Does the Pythagorean theorem work for every triangle?

No, only for right triangles. For other triangles, use the law of cosines, which includes an extra term for the angle.

What if the leg I enter is longer than the hypotenuse?

That cannot form a right triangle, because the hypotenuse is always the longest side. The calculator will report an error.

How do I find the hypotenuse with a basic calculator?

Square each leg, add the results, then take the square root. For legs 6 and 8: 36 + 64 = 100, and √100 = 10.

Who discovered the theorem?

It is named after the Greek mathematician Pythagoras, but Babylonian and Indian mathematicians knew and used the relationship centuries earlier.

Share

Try it yourself

Run your own numbers with our free tool: Pythagorean theorem calculator. No sign-up, and it works on any device.

Open the calculator