My Tools Garage

Pythagorean Theorem Calculator

Solve right triangles with a² + b² = c².

in-browser

How to use

  1. 1 Choose whether to solve for the hypotenuse or a leg.
  2. 2 Enter the two side lengths you already know.
  3. 3 Read the calculated missing side.
  4. 4 Copy the result if you need it.

About Pythagorean Theorem Calculator

The Pythagorean Theorem Calculator solves right triangles using the classic relationship a² + b² = c², where a and b are the two shorter sides (the legs) and c is the hypotenuse opposite the right angle.

It handles both directions of the problem: give it two legs and it returns the hypotenuse, or give it the hypotenuse plus one leg and it finds the remaining leg.

This is one of the most-used results in geometry, and it shows up far beyond the classroom.

Carpenters use it to check that a corner is square, designers use it to find diagonal distances, and anyone working with coordinates relies on it for straight-line distance.

Rather than reaching for a calculator and remembering to take a square root, you simply enter the sides you know and read the answer immediately, with the result updating live as you adjust the inputs.

The tool validates your input too: side lengths must be positive, and when you are solving for a leg the hypotenuse has to be longer than the known leg, otherwise the triangle is impossible — in that case you get a clear message instead of a confusing result.

Everything is computed in your browser, so it is fast, private and works offline.

FAQ

What is the Pythagorean theorem?

In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c².

Why do I get an error when solving for a leg?

When solving for a leg, the hypotenuse must be longer than the known leg. If it is not, no real triangle exists, so the tool reports an error.