Pythagorean Theorem Calculator

Find the hypotenuse from two legs, or find a missing leg from the hypotenuse and one leg (right triangle).

CalcHub

Pythagorean Theorem Calculator

Full page
Live

Preview

0

Add to workspace

Run up to six calculators on one board. You can try without an account—your board stays on this device until you sign in to save it.

Add to workspace

No account needed—build a local board (one workspace on this device). Sign in later to save it to your account.

Open My workspace →

The Pythagorean Theorem Calculator helps you solve missing side lengths in a right triangle. Use it to find the hypotenuse when both legs are known, or to find an unknown leg when the hypotenuse and one leg are known. The calculation is based on the Pythagorean theorem, a² + b² = c², where c is always the hypotenuse, the side opposite the 90° angle.

This tool is appropriate only for right triangles with positive side lengths. If you enter a leg that is longer than the hypotenuse while solving for a missing leg, the result is not valid because c² - a² or c² - b² would be negative. In practice, the calculator is useful for geometry, construction, mapping, and any situation where you need a reliable side-length check.

How This Calculator Works

The calculator uses one of three equivalent forms of the Pythagorean theorem, depending on which side you want to find. If both legs are known, it computes the hypotenuse. If the hypotenuse and one leg are known, it rearranges the formula to isolate the missing leg.

  • Find the hypotenuse: c = √(a² + b²)
  • Find leg a: a = √(c² - b²)
  • Find leg b: b = √(c² - a²)

The calculator assumes that the hypotenuse is the longest side and that the triangle contains a 90° angle. It does not solve general triangles.

Formula

The core relationship is:

a² + b² = c²

Where the variables mean:

VariableMeaning
aOne leg of the right triangle
bThe other leg of the right triangle
cThe hypotenuse, opposite the right angle

Rearranged forms used by the calculator:

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

Important: for the leg formulas, the expression under the square root must be zero or positive. If it is negative, the inputs do not describe a valid right triangle for that mode.

Example Calculation

  1. Choose the hypotenuse mode because both legs are known.
  2. Enter a = 3 and b = 4.
  3. Apply the formula: c = √(3² + 4²).
  4. Square the legs: 3² = 9 and 4² = 16.
  5. Add the results: 9 + 16 = 25.
  6. Take the square root: √25 = 5.
  7. The hypotenuse is c = 5.

This is the classic 3-4-5 right triangle, a common check used in textbooks and practical geometry.

Where This Calculator Is Commonly Used

  • Geometry and math classes: for solving right-triangle exercises and verifying homework.
  • Construction and carpentry: for checking diagonals, squareness, and layout measurements.
  • Surveying and mapping: for distances that can be modeled as right triangles.
  • Engineering and design: for quick side-length checks in orthogonal layouts.
  • Everyday measurement tasks: when a diagonal or side needs to be estimated from perpendicular dimensions.

How to Interpret the Results

If the calculator returns a value, it is the length of the missing side in the same units as your inputs. For example, if you enter meters, the result is in meters. Because the theorem uses squared values, small input changes can lead to noticeably different outputs, especially for longer triangles.

If you are solving for a leg and the calculator cannot produce a real number, the likely cause is that the hypotenuse is shorter than the known leg or that the triangle is not actually a right triangle. Always confirm that c is the longest side and that all values are positive.

Frequently Asked Questions

What does the Pythagorean theorem calculate?

It calculates the relationship between the two legs and the hypotenuse of a right triangle. If you know any two of those three side lengths, you can solve for the third side as long as the triangle is a true right triangle.

Can this calculator find a missing leg?

Yes. If you know the hypotenuse and one leg, the calculator rearranges the formula to find the other leg. The input hypotenuse must be the longest side, and the result only exists if the squared difference is zero or positive.

Why is the hypotenuse always called c?

In standard geometry notation for right triangles, a and b label the legs, while c labels the hypotenuse. This convention makes the theorem easier to write and interpret: a² + b² = c².

Does this work for any triangle?

No. The Pythagorean theorem applies only to right triangles with a 90° angle. For other triangles, you would need a different method, such as the law of cosines or trigonometric formulas.

What happens if I enter zero or a negative number?

Side lengths must be positive. Zero or negative values do not represent valid triangle sides in this calculator and may produce invalid or meaningless results. Recheck the units and measurement inputs before calculating.

Why might my result seem smaller than expected?

A small result usually means the inputs are small or close together. If solving for a leg, verify that the known leg is entered in the correct field and that the hypotenuse really is the longest side.

FAQ

  • What does the Pythagorean theorem calculate?

    It calculates the relationship between the two legs and the hypotenuse of a right triangle. If you know any two of those three side lengths, you can solve for the third side as long as the triangle is a true right triangle.

  • Can this calculator find a missing leg?

    Yes. If you know the hypotenuse and one leg, the calculator rearranges the formula to find the other leg. The input hypotenuse must be the longest side, and the result only exists if the squared difference is zero or positive.

  • Why is the hypotenuse always called c?

    In standard geometry notation for right triangles, a and b label the legs, while c labels the hypotenuse. This convention makes the theorem easier to write and interpret: a² + b² = c².

  • Does this work for any triangle?

    No. The Pythagorean theorem applies only to right triangles with a 90° angle. For other triangles, you would need a different method, such as the law of cosines or trigonometric formulas.

  • What happens if I enter zero or a negative number?

    Side lengths must be positive. Zero or negative values do not represent valid triangle sides in this calculator and may produce invalid or meaningless results. Recheck the units and measurement inputs before calculating.

  • Why might my result seem smaller than expected?

    A small result usually means the inputs are small or close together. If solving for a leg, verify that the known leg is entered in the correct field and that the hypotenuse really is the longest side.