InfiniteCalc

Pythagorean Theorem Calculator

Solve a² + b² = c² for the hypotenuse or a missing leg of a right triangle.

Leg a in both modes.

Leg b when solving for the hypotenuse; hypotenuse c when solving for a leg.

This Pythagorean theorem calculator finds the missing side of any right triangle using a² + b² = c², where a and b are the two legs and c is the hypotenuse — the longest side, opposite the right angle. Choose whether you know both legs or one leg and the hypotenuse, and the calculator solves for the remaining side.

Beyond the missing side, it also reports the triangle’s area, perimeter, and both acute angles in degrees, so a single calculation gives you the complete right triangle. It works for any units — inches, feet, meters — as long as both inputs use the same unit.

How the Pythagorean Theorem Works

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs:

a² + b² = c²

To find the hypotenuse when both legs are known, take the square root of the sum: c = √(a² + b²). To find a missing leg when one leg and the hypotenuse are known, rearrange and subtract: b = √(c² − a²). This is why the hypotenuse must always be longer than either leg — otherwise c² − a² would be zero or negative, and no real triangle exists.

The angles follow from trigonometry: the angle opposite leg a is arcsin(a/c), and the two acute angles always add to 90°.

Pythagorean Triples and Practical Uses

Some right triangles have all whole-number sides. These Pythagorean triples are worth memorizing because they appear constantly in math problems and real construction:

  • 3-4-5 (and multiples: 6-8-10, 9-12-15, 12-16-20)
  • 5-12-13 (and 10-24-26)
  • 8-15-17
  • 7-24-25
  • 20-21-29

Builders use the 3-4-5 rule to square corners: measure 3 ft along one wall and 4 ft along the other; if the diagonal is exactly 5 ft, the corner is a true 90°. The same theorem sizes TV screens (the advertised size is the diagonal), ladder placement against walls, and the shortest diagonal distance across a rectangular room or lot.

Worked Example: Legs of 3 and 4

Find the hypotenuse of a right triangle with legs a = 3 and b = 4.

  • Square the legs: 3² = 9 and 4² = 16.
  • Add them: 9 + 16 = 25.
  • Take the square root: c = √25 = 5.

The complete triangle: area = ½ × 3 × 4 = 6, perimeter = 3 + 4 + 5 = 12, and the acute angles are arcsin(3/5) ≈ 36.87° and 90° − 36.87° = 53.13°.

Going the other way: if you know leg a = 3 and hypotenuse c = 5, the missing leg is b = √(5² − 3²) = √(25 − 9) = √16 = 4.

Frequently Asked Questions

What is the Pythagorean theorem formula?

The formula is a² + b² = c², where a and b are the legs of a right triangle and c is the hypotenuse. To solve for the hypotenuse, use c = √(a² + b²); to solve for a missing leg, use b = √(c² − a²). It only applies to right triangles.

How do I find the hypotenuse of a right triangle?

Square both legs, add the squares, then take the square root of the sum: c = √(a² + b²). For example, with legs of 6 and 8, the hypotenuse is √(36 + 64) = √100 = 10. The hypotenuse is always the side opposite the right angle and the longest side.

Can the Pythagorean theorem be used on any triangle?

No — it holds only for right triangles, which contain exactly one 90° angle. In fact, the converse is a useful test: if the three sides of a triangle satisfy a² + b² = c², the triangle must be a right triangle. For non-right triangles, use the law of cosines instead.

What is a Pythagorean triple?

A Pythagorean triple is a set of three positive whole numbers that satisfies a² + b² = c². The most famous is 3-4-5, since 9 + 16 = 25. Others include 5-12-13, 8-15-17, and 7-24-25. Multiplying every side of a triple by the same number produces another valid triple, such as 6-8-10.

Why must the hypotenuse be longer than each leg?

Because c² equals a² plus b², and both squared legs are positive, c² is strictly greater than either a² or b² alone — so c is longer than either leg. If you enter a hypotenuse shorter than or equal to the known leg, c² − a² would be zero or negative and no real right triangle exists.

Related Calculators