ToolNimba

๐Ÿ“ Pythagorean Theorem Calculator (Find a, b, or c)

By ToolNimba Editorial Team ยท Updated 2026-06-20

Fill in any two of the three values (leg a, leg b, hypotenuse c). Leave the side you want to find blank.

Missing side
-
Triangle area
-
Step by step
  1. Enter two sides and press Calculate.

This Pythagorean theorem calculator finds the missing side of any right triangle when you know the other two. Enter two of the three values (the two legs a and b, or the hypotenuse c with one leg) and it solves for the third using a squared plus b squared equals c squared. It also reports the triangle area and shows every step of the working so you can check it by hand.

What is the Pythagorean Theorem Calculator?

The Pythagorean theorem describes a fixed relationship between the three sides of a right triangle, which is any triangle with a 90 degree corner. The two shorter sides that meet at the right angle are called the legs, usually labelled a and b. The longest side, opposite the right angle, is the hypotenuse, labelled c. The theorem states that a squared plus b squared equals c squared, meaning the area of a square built on the hypotenuse equals the combined area of the squares built on the two legs.

Because the equation links all three sides, knowing any two lets you solve for the third. If you have both legs, you square each, add them, and take the square root to get the hypotenuse: c equals the square root of (a squared plus b squared). If you have the hypotenuse and one leg, you rearrange to solve for the other leg: the missing leg equals the square root of (c squared minus the known leg squared). The subtraction only works when c really is the longest side, which is why this calculator checks that the hypotenuse is larger than each leg before computing.

The theorem applies only to right triangles, so it is not a general tool for any triangle. For triangles without a right angle you would need the law of cosines instead. Within its scope, though, it is one of the most widely used results in all of mathematics, turning up in construction, navigation, computer graphics, and the distance formula on a coordinate grid, which is simply the Pythagorean theorem applied to the horizontal and vertical gaps between two points.

A handy shortcut is to recognise Pythagorean triples, sets of three whole numbers that satisfy the equation exactly, such as 3, 4, 5 or 5, 12, 13. When the numbers in a problem match a known triple or a multiple of one, you can often spot the answer without a calculator. This tool still gives you the precise value either way, plus the area, which for a right triangle is simply half the product of the two legs.

When to use it

  • Finding the length of a diagonal brace, rafter, or ramp when you know the horizontal run and vertical rise.
  • Checking that a corner is square on a building site using the 3, 4, 5 method.
  • Solving geometry and trigonometry homework that gives two sides of a right triangle and asks for the third.
  • Measuring the straight-line distance between two points from their horizontal and vertical separation.

How to use the Pythagorean Theorem Calculator

  1. Enter the two sides you know: the two legs a and b, or the hypotenuse c with one leg.
  2. Leave the box for the side you want to find empty.
  3. Press Calculate to see the missing side, with full step-by-step working.
  4. Read off the triangle area and use Copy result to paste the answer elsewhere.

Formula & method

Right triangle: a2 + b2 = c2, where a and b are the legs and c is the hypotenuse. To find the hypotenuse: c = √(a2 + b2). To find a missing leg: leg = √(c2 − other leg2). Triangle area = 0.5 × a × b.

Worked examples

You know both legs: a = 3 and b = 4. Find the hypotenuse c.

  1. a squared = 3 x 3 = 9
  2. b squared = 4 x 4 = 16
  3. a squared + b squared = 9 + 16 = 25
  4. c = square root of 25 = 5
  5. Area = 0.5 x 3 x 4 = 6

Result: c = 5, area = 6 square units (the classic 3, 4, 5 triangle).

You know the hypotenuse c = 13 and one leg a = 5. Find the other leg b.

  1. c squared = 13 x 13 = 169
  2. a squared = 5 x 5 = 25
  3. c squared minus a squared = 169 - 25 = 144
  4. b = square root of 144 = 12
  5. Area = 0.5 x 5 x 12 = 30

Result: b = 12, area = 30 square units (a 5, 12, 13 triangle).

Common Pythagorean triples (whole-number right triangles)

Leg aLeg bHypotenuse cCheck (a2 + b2)
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
202129400 + 441 = 841
9404181 + 1600 = 1681

Multiples of the 3, 4, 5 triangle (scale every side by the same factor)

FactorLeg aLeg bHypotenuse c
x1345
x26810
x391215
x4121620
x5152025
x10304050

Common mistakes to avoid

  • Treating a leg as the hypotenuse. The hypotenuse c is always the longest side and sits opposite the right angle. If you label a leg as c, the answer comes out wrong. When solving for a leg, the calculator confirms that c is larger than each leg first.
  • Adding instead of subtracting when finding a leg. To find the hypotenuse you add the squares, but to find a missing leg you subtract: leg = square root of (c squared minus the known leg squared). Using addition here gives a value that is too large.
  • Forgetting to take the square root. The theorem gives you c squared, not c. After adding or subtracting the squares you must take the square root to get the actual side length. Stopping at 25 instead of 5 is a common slip.
  • Using it on a non-right triangle. The theorem only holds when one angle is exactly 90 degrees. For triangles without a right angle you need the law of cosines instead, or the relationship will give a misleading result.

Glossary

Right triangle
A triangle containing one 90 degree angle. The Pythagorean theorem applies only to triangles of this kind.
Leg
Either of the two shorter sides that meet at the right angle, usually labelled a and b.
Hypotenuse
The longest side of a right triangle, opposite the right angle, labelled c.
Pythagorean triple
A set of three whole numbers that satisfy a squared plus b squared equals c squared, such as 3, 4, 5.
Square root
The value that, multiplied by itself, gives the original number. The square root of 25 is 5.
Area of a triangle
The space enclosed by the triangle. For a right triangle it equals one half times the product of the two legs.

Frequently asked questions

How do I find the hypotenuse of a right triangle?

Square both legs, add them, then take the square root: c = square root of (a squared plus b squared). For legs of 3 and 4, that is the square root of (9 + 16) = the square root of 25 = 5. Enter the two legs above and the tool does this for you.

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

Subtract the known leg squared from the hypotenuse squared, then take the square root: leg = square root of (c squared minus the known leg squared). With c = 13 and a leg of 5, that is the square root of (169 - 25) = the square root of 144 = 12.

What is the Pythagorean theorem formula?

It is a squared plus b squared equals c squared, where a and b are the two legs and c is the hypotenuse of a right triangle. The square of the hypotenuse equals the sum of the squares of the other two sides.

Does the Pythagorean theorem work for any triangle?

No. It only works for right triangles, which have a 90 degree angle. For a triangle without a right angle you need the law of cosines, which is a more general formula that reduces to the Pythagorean theorem when one angle is 90 degrees.

What are Pythagorean triples?

They are sets of three whole numbers that fit the theorem exactly, such as 3, 4, 5 and 5, 12, 13. Any whole-number multiple of a triple is also a triple, so 6, 8, 10 works just like 3, 4, 5.

How do I find the area of a right triangle?

For a right triangle the two legs are perpendicular, so the area is one half times leg a times leg b. With legs of 3 and 4 the area is 0.5 x 3 x 4 = 6 square units. This calculator shows the area whenever both legs are known.