Pythagorean Theorem Calculator

The Pythagorean theorem says a² + b² = c² for a right triangle, where c is the hypotenuse (the longest side). If the legs are 3 and 4, then c = √(9 + 16) = √25 = 5. To find a leg instead, use a = √(c² − b²).

Inputs

Result
–

Results are calculated in your browser for convenience. Double-check important figures before relying on them.

How do you use the Pythagorean theorem?

a² + b² = c² Hypotenuse: c = √(a² + b²) Missing leg: a = √(c² − b²)

Find the hypotenuse: legs 5 and 9 give c = √(25 + 81) = √106 = 10.2956. Find a leg: hypotenuse 13 and leg 12 give a = √(169 − 144) = √25 = 5.

The theorem only works for right triangles, which have one 90° angle. The hypotenuse is always opposite that angle and is always the longest side.

What are Pythagorean triples?

A Pythagorean triple is a set of three whole numbers that satisfies a² + b² = c². The calculator tells you when your sides form one.

abcCheck
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
202129400 + 441 = 841

Any multiple of a triple is another triple, so 6-8-10 and 9-12-15 also work.

Where is the Pythagorean theorem used?

  • Construction: checking that a corner is square using the 3-4-5 rule, and finding rafter and ladder lengths.
  • Distance: the straight-line distance between two points is the hypotenuse of a right triangle (the distance formula).
  • Screens and TVs: a diagonal is the hypotenuse of width and height.
  • Navigation and design: finding diagonal distances on maps and floor plans.

For a full triangle with any angles, see the triangle calculator.

Complete guide to the Pythagorean Theorem Calculator

How to use the Pythagorean Theorem Calculator, step by step

  1. Choose whether to find the hypotenuse or a leg.
  2. Enter the two known sides.
  3. Read the missing side, area, perimeter and angles.
  4. Check whether the sides form a Pythagorean triple.

Common mistakes to avoid

  • Using the theorem on a triangle with no right angle.
  • Entering a hypotenuse shorter than a leg.
  • Forgetting to take the square root at the end.

Key terms explained

Hypotenuse
The side opposite the right angle.
Leg
One of the two shorter sides.
Pythagorean triple
Three whole numbers where a² + b² = c².
Right triangle
A triangle with one 90° angle.

Frequently asked questions

How do I find the hypotenuse of a right triangle?

Square both legs, add them and take the square root: c = √(a² + b²). Legs of 3 and 4 give 5.

How do I find a missing leg?

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

Does the Pythagorean theorem work for any triangle?

No, only for right triangles. For other triangles use the law of cosines, which includes a correction term.

What is a Pythagorean triple?

A set of three whole numbers that satisfy a² + b² = c², such as 3-4-5 or 5-12-13.

How do I calculate the diagonal of a rectangle?

The diagonal is the hypotenuse of a right triangle made from the width and height: d = √(width² + height²).

Related calculators

Guides worth reading