Ultimate Calculator
Geometry guide

The Pythagorean theorem explained

The Pythagorean theorem says a² + b² = c² for any right triangle. Learn to find the hypotenuse or a leg, common triples, and real-world uses.

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². If you know any two sides, you can find the third.

a² + b² = c²

The parts of a right triangle

A right triangle has one 90° angle. The two sides that form the right angle are the legs, labelled a and b. The side opposite the right angle is the hypotenuse, labelled c. It is always the longest side.

The theorem works only for right triangles. For other triangles you need the law of cosines.

Finding the hypotenuse

c = √(a² + b²)

Example 1. The legs are 6 and 8.

  1. Square each leg: 6² = 36 and 8² = 64.
  2. Add: 36 + 64 = 100.
  3. Take the square root: √100 = 10.

Example 2. The legs are 5 and 7. Then c² = 25 + 49 = 74, so c = √74 ≈ 8.60. Most triangles do not have whole-number answers, and that is normal.

Finding a leg

Rearrange the formula. When the unknown is a leg, you subtract.

a = √(c² − b²)

Example 3. The hypotenuse is 13 and one leg is 5. The other leg is √(169 − 25) = √144 = 12.

Example 4. A 10-foot ladder leans against a wall with its base 3 feet from the wall. How high does it reach? The ladder is the hypotenuse, so the height is √(10² − 3²) = √(100 − 9) = √91 ≈ 9.54 feet.

The Pythagorean theorem calculator solves for whichever side you leave blank.

Pythagorean triples

A Pythagorean triple is a set of three whole numbers that satisfy the theorem. Recognizing them saves time.

abcCheck
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
202129400 + 441 = 841

Any multiple of a triple is also a triple. Doubling 3-4-5 gives 6-8-10 (Example 1), and multiplying by 5 gives 15-20-25.

Testing for a right angle

The theorem also works in reverse. If the three sides of a triangle satisfy a² + b² = c², with c the longest side, the triangle has a right angle. You can go further:

  • If c² = a² + b², the triangle is right.
  • If c² < a² + b², the triangle is acute (all angles under 90°).
  • If c² > a² + b², the triangle is obtuse (one angle over 90°).

For sides 7, 10 and 12: 12² = 144, and 7² + 10² = 149. Since 144 is less than 149, the triangle is acute.

Real uses

  • Squaring a corner. Builders measure 3 units along one edge and 4 along the other. If the diagonal between the marks is exactly 5, the corner is 90°. Larger versions such as 6-8-10 or 9-12-15 feet give more accuracy.
  • Distance between two points. The horizontal and vertical gaps are the legs, and the straight-line distance is the hypotenuse. From (1, 2) to (7, 10) the gaps are 6 and 8, so the distance is 10. The distance calculator applies this formula directly.
  • Screen sizes. A screen is sold by its diagonal. A 55-inch screen with a 16:9 shape is about 47.9 inches wide and 27.0 inches tall, because 47.9² + 27.0² ≈ 55².
  • Shortcuts. Walking 300 m east and then 400 m north covers 700 m. Cutting straight across is √(300² + 400²) = 500 m.
  • Roofs, ramps and stairs. The rafter or ramp length is the hypotenuse of the rise and the run.

Two special right triangles

  • 45°-45°-90°: the legs are equal and the hypotenuse is a leg times √2 ≈ 1.414. A square with side 10 has a diagonal of about 14.14.
  • 30°-60°-90°: the sides are in the ratio 1 : √3 : 2. The shortest side is half the hypotenuse.

Common mistakes

  • Adding before squaring. √(a² + b²) is not a + b. For legs 6 and 8 the hypotenuse is 10, not 14.
  • Forgetting the square root. c² = 100 is not the final answer. c = 10 is.
  • Adding when solving for a leg. If you know the hypotenuse, subtract: 13² − 5², not 13² + 5².
  • Putting the hypotenuse in as a leg. Identify the side opposite the right angle first. If your answer for a leg is longer than the hypotenuse, something is swapped.
  • Using it on non-right triangles. Check for the 90° angle before applying the formula.
  • Mixing units. Convert feet and inches to one unit before squaring.

Common questions

What is the Pythagorean theorem formula?

For a right triangle with legs a and b and hypotenuse c, a² + b² = c². The hypotenuse is the side opposite the right angle.

How do I find a missing leg of a right triangle?

Square the hypotenuse, subtract the square of the known leg, and take the square root. With hypotenuse 13 and leg 5, the other leg is √(169 − 25) = 12.

Does the Pythagorean theorem work for all triangles?

No, it applies only to right triangles. It can be used in reverse to test whether a triangle with three known sides has a right angle.