Geometry · Calculator

The Pythagorean theorem, with every step shown

Find the hypotenuse, find a missing leg, or check whether three sides make a right triangle. Each step is written out, with the exact answer (like 5√2) and the decimal.

What do you want to do?

The legs are the two sides that meet at the right angle.

Hypotenuse 13 cm.

Hypotenuse c

13 cm

a² = 25a = 5 cmb² = 144b = 12 cmc² = 169c = 13 cm
  1. 1Square each leg. a² = 5 × 5 = 25, and b² = 12 × 12 = 144.
  2. 2Add them: a² + b² = c². 25 + 144 = 169, so c² = 169.
  3. 3Take the square root. c = √169 = 13 cm. Check: c is longer than both legs.

Quick answer

The Pythagorean theorem says that in a right triangle, a² + b² = c²: the squares of the two legs add up to the square of the hypotenuse, the longest side. To find the hypotenuse, square the legs, add, and take the square root. A triangle with legs 3 and 4 has a hypotenuse of √(9 + 16) = √25 = 5.

Legs and the hypotenuse

Leg a

One of the two sides that make the right angle.

Leg b

The other side of the right angle. It does not matter which leg you call a or b.

Hypotenuse c

The side across from the right angle. It is always the longest side.

Why a² + b² = c²

3 × 3 = 94 × 4 = 165 × 5 = 25

0 + 0 = 0 of 25

Draw a square on each side of a right triangle and watch the tiles move. For a 3-4-5 triangle, the square on the short leg holds 9 unit squares, the square on the other leg holds 16, and the square on the hypotenuse holds 25. The two smaller squares together cover exactly as much as the big one: 9 + 16 = 25. That is true for every right triangle, and it is what a² + b² = c² means: the areas of the squares on the legs add up to the area of the square on the hypotenuse.

Pythagorean triples to know

Whole-number sides that fit the rule. Test makers use them often, so spotting one saves the square root.

3, 4, 5

9 + 16 = 25

5, 12, 13

25 + 144 = 169

8, 15, 17

64 + 225 = 289

7, 24, 25

49 + 576 = 625

20, 21, 29

400 + 441 = 841

6, 8, 10

36 + 64 = 100 (3, 4, 5 doubled)

Distance between two points

To find the distance between two points on a grid, draw a right triangle: one leg goes across, the other goes up. From (1, 2) to (7, 10), the legs are 7 − 1 = 6 and 10 − 2 = 8, so the distance is √(36 + 64) = √100 = 10. The distance formula, d = √((x₂ − x₁)² + (y₂ − y₁)²), is this same idea written once.

Common mistakes

Forgetting to square

For legs 3 and 4, 3 + 4 = 7 is not the hypotenuse. Square first: 9 + 16 = 25, and √25 = 5.

Adding when you should subtract

If you know the hypotenuse, the missing leg is √(c² − a²). With c = 13 and a = 5: 169 − 25 = 144, so the leg is 12, not √194.

Putting the wrong side as c

c is always the hypotenuse: the longest side, across from the right angle. A leg can never be longer than it.

Stopping at c²

a² + b² gives c², not c. The last step is always the square root: c² = 25 means c = 5.

Practice: try these

Work each one out, then tap to check. You can also use the calculator above.

1. A 13-foot ladder leans against a wall with its foot 5 feet from the wall. How high up the wall does it reach?

The ladder is the hypotenuse. Height = √(13² − 5²) = √(169 − 25) = √144 = 12 feet.

2. A rectangle is 9 inches by 12 inches. How long is its diagonal?

The diagonal splits the rectangle into two right triangles with legs 9 and 12. Diagonal = √(81 + 144) = √225 = 15 inches.

3. What is the distance between the points (1, 2) and (7, 10)?

Draw the right triangle: across 7 − 1 = 6 and up 10 − 2 = 8. Distance = √(36 + 64) = √100 = 10 units.

4. Can a triangle with sides 7, 24 and 25 be a right triangle?

Square the sides: 49 + 576 = 625, and 25² = 625. They are equal, so yes, it is a right triangle.

5. A square park is 100 m on each side. How much shorter is it to walk across the diagonal than along two sides?

Diagonal = √(100² + 100²) = √20,000 = 100√2, about 141.42 m. Along two sides is 200 m, so the diagonal saves about 58.58 m.

Where iMasterly teaches this

In grade 8 math, the unit The Pythagorean Theorem has three lessons: Understanding the Pythagorean Theorem (the squares-on-the-sides picture above), Applying the Pythagorean Theorem (ladders, diagonals and checking for right triangles) and Distance on the Coordinate Plane. See what else grade 8 covers in the 8th grade math guide.

Questions about the Pythagorean theorem

What is the Pythagorean theorem?
In a right triangle, the squares of the two legs add up to the square of the hypotenuse: a² + b² = c². The hypotenuse c is the longest side, across from the right angle. For legs 3 and 4, 9 + 16 = 25, so the hypotenuse is 5.
How do you find the hypotenuse?
Square both legs, add them, and take the square root: c = √(a² + b²). For legs 6 and 8: 36 + 64 = 100, and √100 = 10.
How do you find a missing leg?
Square the hypotenuse and the leg you know, subtract, and take the square root: b = √(c² − a²). For c = 10 and a = 6: 100 − 36 = 64, so b = 8.
Does the Pythagorean theorem work for every triangle?
No, only for right triangles. The converse also holds: if a² + b² = c² for a triangle's three sides (with c the longest), the triangle is a right triangle. That is how you check whether an angle is exactly 90°.
What is a Pythagorean triple?
Three whole numbers that fit a² + b² = c², such as 3, 4, 5 or 5, 12, 13. Multiplying a triple by the same number gives another one: 3, 4, 5 doubled is 6, 8, 10.
What if the answer is not a whole number?
Then it is a square root that does not come out even, like √50. You can simplify it (√50 = √25 × √2 = 5√2) or round it (about 7.07). The calculator shows both.
Who discovered the Pythagorean theorem?
It is named after the Greek mathematician Pythagoras, who lived in the 500s BC, but it was known much earlier: a Babylonian clay tablet called Plimpton 322, more than a thousand years older, lists sets of numbers that fit the rule.
What grade learns the Pythagorean theorem?
Grade 8 in the Common Core (8.G.B.6-8): students explain a proof of the theorem and its converse, use it to find unknown sides in two and three dimensions, and use it to find the distance between two points on a coordinate plane.

Want it to really click?

Step-by-step math lessons for every grade, K–8, with Ms. Emma reading every step aloud.