CalcSeed

Pythagorean Theorem Calculator

Enter any two sides of a right triangle and solve for the third — either leg or the hypotenuse.

=
Quick answer: with the default inputs (3 units, 4 units), the hypotenuse is 5 units. Change any input to update the result.
Hypotenuse
—

What this calculator does

Enter any two sides of a right triangle and the calculator returns the third. Give the two legs a and b and it solves the hypotenuse c; give the hypotenuse and one leg and it solves the other leg. At the defaults a = 3, b = 4 and c = 5 it confirms the most famous right triangle in mathematics: 3-4-5.

The theorem and why it holds

a2+b2=c2a^2+b^2=c^2

In any right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the two legs. The classic rearrangement proof makes the identity visible: build a big square with side a + b and tile it with four copies of the triangle. Read one way, the inner hole is a square of area c²; read the other way, the same hole is two squares of areas a² and b². Since the total area cannot depend on how you read it, a² + b² = c².

To find the hypotenuse, add the squares of the legs and take the square root: c = √(a² + b²). To find a leg, subtract the known leg’s square from the hypotenuse’s square and take the square root: a = √(c² − b²). With c = 5 and a = 3, that is √(25 − 9) = √16 = 4.

Worked example at the defaults

Take legs of 3 and 4. Then c² = 3² + 4² = 9 + 16 = 25, so c = √25 = 5. Reverse it: from c = 5 and a = 3, the missing leg is √(5² − 3²) = √16 = 4. Both routes land on the calculator’s default answer, which is why carpenters use this exact triple to square corners: mark 3 ft along one wall, 4 ft along the other, and the diagonal between the marks must be exactly 5 ft. If it is, the corner is 90°.

Triples worth memorising

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

Every triple scales: multiplying each side by the same factor keeps the triangle right, so 6-8-10, 9-12-15 and 30-40-50 all work. Carpenters who need a bigger measuring loop jump from 3-4-5 to 6-8-10, because a longer diagonal magnifies any out-of-square error and makes it easier to correct.

Where the theorem earns its keep

  • Construction layout. The 3-4-5 rule squares foundations, decks and tile courses with nothing but a tape measure.
  • Screens. A 55-inch 16:9 television is about 47.97 in wide and 26.98 in tall, because 47.97² + 26.98² ≈ 55².
  • Ladder safety. A ladder reaching 16 ft up a wall with its feet 4 ft out has length √(256 + 16) = √272 ≈ 16.49 ft.
  • Navigation. Walking 3 blocks east then 4 blocks north puts you √25 = 5 blocks from the start.

Common mistakes

  • Assuming the longest given side is the hypotenuse. If a problem says sides 5, 3 and an unknown x, the hypotenuse is 5 and x = 4; treating 5 as a leg gives √(25 + 9) ≈ 5.83, a wrong answer.
  • Using it on non-right triangles. For a general triangle with three known sides, the law of cosines or Heron’s formula is required; this calculator’s triangle calculator handles those.
  • Forgetting the square root. With legs 3 and 4, the answer is not 25 but √25 = 5.
  • Subtracting the wrong way. c² − a² is fine, but a² − c² is negative and has no real square root — a signal that the hypotenuse was entered as a leg.

When the answer is not a whole number

Most right triangles are not tidy triples. Legs of 1 and 1 give c = √2 ≈ 1.41; legs of 5 and 3 give c = √34 ≈ 5.83, the same diagonal the rectangle calculator reports for a 5 × 3 rectangle. These irrational results are normal: the exact answer is a square root, and the calculator’s four-decimal display is a rounding, not an approximation of the method. For construction work, two decimal places already beats the accuracy of a tape measure; for machining, carry more digits or use triple-sized layouts that stay in whole numbers.

The converse is a tool, not a footnote

The converse also holds and is just as useful: if three sides satisfy a² + b² = c², the triangle is necessarily right-angled with c as the hypotenuse. That one-line test turns this theorem from a calculation tool into an inspection tool — measure three sides and you have proven a corner is square without ever touching a protractor. Sides of 20, 21 and 29 pass the test because 400 + 441 = 841 = 29², so that triangle is guaranteed a right angle.

Frequently asked questions

How do I find the hypotenuse?

Square both legs, add them, and take the square root: c = √(a² + b²). For legs 3 and 4, c = √(9 + 16) = √25 = 5.

How do I find a missing leg?

Subtract the known leg’s square from the hypotenuse’s square, then take the square root. With c = 5 and a = 3, the other leg is √(25 − 9) = √16 = 4.

Does this work for any triangle?

No, only right triangles. For a general triangle with three known sides, use Heron’s formula for area or the law of cosines for the remaining side.

What is the 3-4-5 rule in construction?

Mark 3 ft along one wall and 4 ft along the perpendicular wall; the diagonal between the marks must be exactly 5 ft if the corner is square. Scale it to 6-8-10 or 9-12-15 for bigger layouts — any multiple of 3-4-5 works.

What are Pythagorean triples?

Whole-number side sets like 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 9-40-41. Each satisfies a² + b² = c² exactly, and any equal-ratio multiple of a triple (6-8-10, 10-24-26) is also a triple.

Why must the hypotenuse be the longest side?

Because c² = a² + b² is strictly greater than either a² or b², so c exceeds both legs. If the longest given side is not opposite the right angle, the theorem does not apply.

What if the answer is irrational?

That is normal. Legs of 1 and 1 give c = √2 ≈ 1.41; legs of 5 and 3 give c = √34 ≈ 5.83. Only special triples produce whole numbers.

Can I use this to find a rectangle’s diagonal?

Yes. A rectangle’s diagonal is the hypotenuse of the corner triangle formed by its length and width: for 5 × 3, the diagonal is √(25 + 9) ≈ 5.83.

How do I check whether a triangle is right-angled?

Use the converse: square all three sides and test whether the two smaller squares sum to the largest. Sides 20, 21, 29 pass because 400 + 441 = 841 = 29², so that triangle is right-angled.

How far apart are two points on a grid?

The distance is the hypotenuse of the horizontal and vertical gaps. From (1, 2) to (4, 6), the gaps are 3 and 4, so the distance is √(9 + 16) = 5 units.

Method and sources

Calculation basis

Formulas are the standard closed-form expressions of Euclidean geometry, exact for the given inputs.

Last updated: November 17, 2026
Formula & data sources
  • Pythagorean theorem: c² = a² + b².

Cite this page

Reference formats
APA 7CalcSeed. (2026, November 17). Pythagorean Theorem Calculator. https://calcseed.com/c/geometry/pythagorean-theorem-calculator/
MLA 9"Pythagorean Theorem Calculator." CalcSeed, 17 Nov. 2026, calcseed.com/c/geometry/pythagorean-theorem-calculator/.
ChicagoCalcSeed. "Pythagorean Theorem Calculator." Last modified November 17, 2026. https://calcseed.com/c/geometry/pythagorean-theorem-calculator/

Related calculators