Pythagorean Theorem Calculator

Find any missing side of a right triangle, plus its angles, area and perimeter.

What the Pythagorean Theorem Calculator does

In any right triangle the square of the hypotenuse equals the sum of the squares of the two shorter sides. It is the foundation of distance measurement, from carpentry squares to GPS coordinates.

Formula

  • a² + b² = c²
  • c = √(a² + b²)
  • b = √(c² − a²)

Inputs explained

InputUnitRequiredNotes
What are you solving for?one of 2 optionsYes—
Side anumberYesAccepts more than 0.
Side bnumberIn some modesAccepts more than 0. Shown What are you solving for? is Hypotenuse (c).
Hypotenuse cnumberIn some modesAccepts 0 or more. Shown What are you solving for? is A missing leg.

How to use it

  1. Choose What are you solving for?.
  2. Enter Side a.
  3. Fill in the remaining inputs the form shows for your choice.
  4. Select Calculate.

Worked example

A ladder reaches 12 ft up a wall with its base 5 ft out. How long is the ladder?

Side a
5
Side b
12

√(25 + 144) = √169 = 13 ft.

Reading the result

  • The theorem only applies to the hypotenuse — the longest side, opposite the right angle — so which side is entered as c matters: solving for a leg uses a different rearrangement of the same formula than solving for the hypotenuse itself.

Common mistakes

  • Entering the hypotenuse into the wrong field, or treating either of two given sides as if it could be the hypotenuse. Only the side opposite the right angle is c in a² + b² = c².

Frequently asked questions

Does this work for any triangle?

Only right triangles. For others use the law of cosines: c² = a² + b² − 2ab·cos(C).

What is a Pythagorean triple?

Three whole numbers that satisfy the theorem, such as 3-4-5, 5-12-13 and 8-15-17. Builders use 3-4-5 to check for square corners.

Related calculators