Home › Math & Science › Pythagorean Theorem Calculator

Pythagorean Theorem Calculator

Use this Pythagorean theorem calculator to find the missing side of a right-angled triangle. Enter the two legs to get the hypotenuse, enter one leg and the hypotenuse to get the other leg, or enter all three sides to check whether a triangle is truly right-angled.

Enter the two legs, a and b. The hypotenuse c is worked out for you.

How to use this Pythagorean theorem calculator

  1. Choose a mode: find the hypotenuse, find a missing leg, or check a triangle.
  2. Enter the sides you know — a and b are the two sides around the right angle; c is the side opposite it.
  3. In the leg modes, also enter the hypotenuse c. In the check mode, enter all three sides.
  4. Read the missing side, plus the triangle's area and perimeter.

How the Pythagorean theorem works

The theorem is about right-angled triangles — triangles with one corner of exactly 90 degrees, like the corner of a book. The side opposite that corner is called the hypotenuse, and it is always the longest side. The other two sides, the legs, form the right angle itself. The theorem says the square built on the hypotenuse has exactly the same area as the squares built on the two legs combined.

a² + b² = c²  ·  Hypotenuse: c = √(a² + b²)  ·  Leg: a = √(c² − b²),   b = √(c² − a²)

Finding the hypotenuse is an addition: square both legs, add, and take the square root. Finding a leg is the same sum run backwards: square the hypotenuse, subtract the square of the known leg, and take the square root. That subtraction is also a built-in sanity check — the hypotenuse must be longer than each leg, so if c² − b² comes out negative, the sides you entered cannot belong to a right triangle.

The check mode turns the theorem into a yes-or-no test. It takes your longest entered side as the possible hypotenuse and compares a² + b² with c². Builders rely on this in reverse with the 3-4-5 rule: if a frame measures 3 units one way, 4 units the other way and exactly 5 across the diagonal, the corner must be square. Carpenters, tilers and surveyors use this daily, often without knowing its name.

Worked example

Example 1 — the classic. A right triangle has legs a = 3 and b = 4. Then c = √(3² + 4²) = √(9 + 16) = √25 = 5. Its area is 3 × 4 ÷ 2 = 6 square units, and its perimeter is 3 + 4 + 5 = 12 units. Enter 3 and 4 in "Find the hypotenuse" mode and the calculator agrees.

Example 2 — a non-integer answer. Legs a = 5 and b = 7: c = √(25 + 49) = √74 = 8.6023 (approximately). Most real triangles are like this — the answer is not a round number, and that is normal.

Example 3 — finding a leg. A ladder (hypotenuse) is 13 long and its foot stands 5 from the wall (leg a = 5). The height it reaches is b = √(13² − 5²) = √(169 − 25) = √144 = 12. Choose "Find leg b", enter a = 5 and c = 13, and the calculator gives 12.

Common Pythagorean triples

Leg aLeg bHypotenuse cCheck
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
202129400 + 441 = 841

Any multiple of a row is also a triple — double 3-4-5 and you get 6-8-10. Triples are handy because they let you set out perfect right angles on a building site or check a diagonal with nothing but a tape measure.

FAQ

What is the Pythagorean theorem in simple words?

In a right-angled triangle, the square of the longest side (the hypotenuse) equals the sum of the squares of the other two sides: a² + b² = c². It only works for triangles with one angle of exactly 90 degrees. The best-known example is 3-4-5: 3² + 4² = 9 + 16 = 25 = 5².

How do I find the hypotenuse if I know both legs?

Square each leg, add the squares, and take the square root. For legs of 5 and 7: 25 + 49 = 74, and √74 ≈ 8.6023. So the hypotenuse is about 8.60 units. This calculator's 'Find the hypotenuse' mode does exactly this.

How do I find a missing leg if I know the hypotenuse?

Square the hypotenuse, subtract the square of the known leg, and take the square root. For a hypotenuse of 13 and one leg of 5: 169 − 25 = 144, and √144 = 12. The other leg is 12. The hypotenuse must always be longer than either leg — if your subtraction goes negative, the numbers cannot form a right triangle.

How can I check if a triangle is right-angled?

Take the longest side as the possible hypotenuse and test whether a² + b² equals c² for the other two sides. Sides 6, 8 and 10 work: 36 + 64 = 100 = 10², so it is a right triangle. Sides 2, 3 and 4 do not: 4 + 9 = 13, not 16. Use the 'Check a right triangle' mode of this calculator to test any three sides.

What are some common Pythagorean triples to remember?

Triples are sets of whole numbers that fit the theorem exactly: 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29. Any multiple of a triple is also a triple, so 6-8-10 and 9-12-15 work too. Builders use 3-4-5 daily: measure 3 units along one wall and 4 along the other, and the diagonal is exactly 5 only when the corner is a perfect right angle.

What is a common mistake when using the Pythagorean Theorem Calculator?

Typing a value into the wrong field, or in the wrong format. A quick re-check of each field before you press Calculate avoids most wrong results.

I am new to this — how do I get started with the Pythagorean Theorem Calculator?

Start with the worked example on this page: it walks through a real case step by step. Then replace the example values with your own and calculate — you can change the numbers and re-run it as many times as you like.

Which other tools work well with the Pythagorean Theorem Calculator?

The Related tools section on this page links the calculators and converters people use most often alongside the Pythagorean Theorem Calculator. They are all free, so you can carry your result straight into the next calculation.