The Pythagorean Theorem Explained With Real-World Examples

Understand a² + b² = c², find a hypotenuse or missing leg, check square corners with 3-4-5, and apply Pythagoras to ladders, screens and distances.

Updated September 29, 2026 6 min read

Use the free Pythagorean Theorem CalculatorFind the hypotenuse or a missing leg of a right triangle, with a diagram

If you have ever checked that a wall, a deck frame or a garden bed is truly square, worked out how long a ladder needs to be, or wondered how a "55-inch" screen is measured, you have met the Pythagorean theorem, whether you called it that or not. It is probably the most practical formula in school geometry.

This guide explains what the theorem says and why it is true, how to find either the hypotenuse or a missing leg, how builders use the 3-4-5 rule, which whole-number triangles are worth knowing, and the mistakes that give wrong answers. Every example was checked with our calculator.

What the theorem says

In a right triangle (a triangle with one 90° angle), the two sides that form the right angle are the legs, usually called a and b. The side opposite the right angle is the hypotenuse, c. It is always the longest side.

The theorem states:

a² + b² = c²

The area of the square built on the hypotenuse equals the combined areas of the squares on the two legs.

It only holds for right triangles. For any other triangle you need the law of cosines, which the Triangle Calculator handles.

Why it is true: a quick proof

Take four copies of the same right triangle and arrange them inside a large square of side a + b, with their hypotenuses forming a tilted square in the middle. The large square's area can be counted two ways:

(a + b)² = 4 × (½ab) + c²
a² + 2ab + b² = 2ab + c²
a² + b² = c²

There are hundreds of other proofs, but this one shows the theorem is really a statement about areas.

Finding the hypotenuse

Square both legs, add them, and take the square root.

Example: legs 3 and 4

c² = 3² + 4² = 9 + 16 = 25
c = √25 = 5

Example: legs 5 and 7

c² = 25 + 49 = 74
c = √74 ≈ 8.602

The exact answer is √74. Whether you write the surd or the decimal depends on the context: exams often want √74, a cutting list wants 8.60.

Finding a missing leg

Rearrange to subtract instead of add:

a² = c² − b²

Example: a ladder. A 5 m ladder stands with its foot 1.5 m from a wall. How high up the wall does it reach?

h² = 5² − 1.5² = 25 − 2.25 = 22.75
h = √22.75 ≈ 4.770 m

Example: hypotenuse 13, leg 5. The other leg is √(169 − 25) = √144 = 12.

Screen sizes and aspect ratios

A screen's advertised size is its diagonal. For a 16:9 screen, the width and height are 16k and 9k for some k, and the diagonal is k√(16² + 9²) = k√337. For a 55-inch diagonal:

k = 55 ÷ √337 ≈ 2.996
width ≈ 16 × 2.996 ≈ 47.9 in
height ≈ 9 × 2.996 ≈ 27.0 in

The same method works for any aspect ratio; the Aspect Ratio Calculator helps with the ratio side.

The 3-4-5 rule for square corners

Because 3² + 4² = 5², any triangle with sides 3, 4 and 5 has a right angle. Builders, landscapers and carpenters use this to set out square corners without a large set square:

  1. From the corner, measure 3 units along one side and mark it.
  2. Measure 4 units along the other side and mark it.
  3. Measure between the marks. If it is exactly 5 units, the corner is 90°.

Any multiple works: 6-8-10, or 0.9 m, 1.2 m and 1.5 m. Larger multiples are more accurate on big layouts because small measuring errors matter less.

Pythagorean triples worth knowing

A Pythagorean triple is a set of three whole numbers that satisfy the theorem. The common ones:

a b c
3 4 5
5 12 13
8 15 17
7 24 25
20 21 29

Multiply any triple by a constant to get another: 6-8-10, 9-12-15, 10-24-26. Decimal versions work too: legs 2.4 and 3.2 give a hypotenuse of exactly 4, since that is 3-4-5 scaled by 0.8.

Distance between two points

The straight-line distance between two points on a grid is the hypotenuse of a right triangle whose legs are the horizontal and vertical differences:

d = √((x₂ − x₁)² + (y₂ − y₁)²)

This is the distance formula, and the Midpoint Calculator applies it in both 2D and 3D.

How to use the Pythagorean Theorem Calculator

  1. Open the Pythagorean Theorem Calculator.
  2. Fill in any two of Leg a, Leg b and Hypotenuse c, and leave the side you want blank. Decimals and fractions are accepted.
  3. Read the Missing side. It is shown in exact form, such as √74 or (√91)/2, and the Decimal row gives the approximate value.
  4. The rows also give all three Sides a, b, c, the two acute angles, the Area (½ab), the Perimeter, the Height to the hypotenuse and whether the sides form a Pythagorean triple.
  5. A labelled diagram shows the triangle with the right angle marked. Open the steps to see the squares, the sum or difference and the square root.

If the hypotenuse you enter is not longer than the leg, the tool explains why no right triangle is possible.

Other ways to do it

  • Any calculator: square, add or subtract, then press √. Keep the full value until the end.
  • Spreadsheets: =SQRT(A2^2+B2^2) for the hypotenuse, or =SQRT(C2^2-A2^2) for a leg. Excel and Google Sheets do not have a built-in hypotenuse function.
  • Programming: Python's math.hypot(3, 4) returns 5.0 and avoids overflow with very large values.

To simplify a surd answer like √72 = 6√2, use the Square Root Calculator.

Common mistakes

Adding when you should subtract

If the hypotenuse is known and a leg is missing, subtract: a² = c² − b². Adding gives a number longer than the hypotenuse, which is impossible.

Using it on a non-right triangle

The theorem needs a 90° angle. Check the drawing or the problem statement before applying it.

Mislabelling the hypotenuse

The hypotenuse is opposite the right angle, not simply the side labelled c in a diagram.

Taking the root of each term

√(3² + 4²) = √25 = 5, not 3 + 4 = 7. Add the squares first, then take one square root.

Frequently asked questions

How do I find the hypotenuse of a right triangle?

Square both legs, add the results, and take the square root. For legs of 5 and 12, √(25 + 144) = √169 = 13.

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

Subtract the square of the known leg from the square of the hypotenuse, then take the square root. With c = 10 and a = 6, b = √(100 − 36) = 8.

Does the Pythagorean theorem work for all triangles?

No, only right triangles. For other triangles, the law of cosines, c² = a² + b² − 2ab cos C, generalises it.

What is the 3-4-5 rule?

It is a way to check a right angle: sides of 3, 4 and 5 units, or any multiple of them, always form a right triangle because 9 + 16 = 25.

Why is my answer an irrational number?

Most combinations of whole-number legs give a hypotenuse that is not a whole number, such as √2 for legs of 1 and 1. Only Pythagorean triples give whole-number results.

Try it now: Pythagorean Theorem Calculator

Loading tool…