To do the Pythagorean theorem, find the right angle, label the side opposite it c (the hypotenuse) and the other two sides a and b, then substitute the two lengths you know into a2 + b2 = c2. Square them, add to find c or subtract to find a leg, and take the square root.
Below, that sentence is broken into eight steps you can follow on any problem, followed by a worked example of each type. If you first want to understand what the theorem says, read what the Pythagorean theorem is; for the algebra behind each version of the equation, see the Pythagorean theorem formula.
How to use the Pythagorean theorem in 8 steps
- Check for a right angle. Look for the small square in a corner, the words "right triangle", or an angle given as 90°. No right angle, no Pythagorean theorem.
- Find the hypotenuse. It is the side directly across from the right angle, the one that does not touch it. Whatever the triangle's position on the page, this is your c. (More on the parts of a right triangle.)
- Label the legs. The two sides that form the right angle are a and b. Which one is a does not matter.
- Decide which side is missing. If it is c, you will add. If it is a or b, you will subtract.
- Write the formula and substitute. Copy a2 + b2 = c2 and replace the letters you know with numbers. Writing the formula first stops you from putting a number in the wrong place.
- Square the numbers. Multiply each known side by itself: 72 = 49, not 14.
- Add or subtract, then take the square root. For the hypotenuse, add the two squares. For a leg, subtract the smaller square from the larger. Then take the square root of the result to get back to a length.
- Check the answer. The hypotenuse must be the longest side and shorter than the two legs added together. Give the exact answer, a rounded decimal if asked, and the units.
Steps 1 to 3 are where most mistakes happen, especially when the triangle is drawn in an unusual position. The animation shows them on a triangle whose hypotenuse lies along the bottom.
Flowchart: add or subtract?
Once the sides are labeled, the whole problem comes down to one decision. Follow the arrows:
A memory aid: the hypotenuse is the biggest side, and adding makes numbers bigger. A leg is smaller than the hypotenuse, and subtracting makes numbers smaller. If you ever find yourself subtracting to get a hypotenuse or adding to get a leg, stop and relabel. Triangles without a right angle need a different tool, the law of cosines.
Case 1: finding the hypotenuse
You know both legs and want the longest side. The formula is c = √a2 + b2. The answer may be a whole number or a square root that does not simplify to one; both are handled the same way. The hypotenuse page has more examples of this case.
Example 1: a whole-number answer
A right triangle has legs 12 and 35. Find the hypotenuse.
c2= 122 + 352= 144 + 1225= 1369c= √1369 = 37c = 37. Check: 37 is more than 35 and less than 12 + 35 = 47.
Example 2: an answer in radical form
A right triangle has legs 6 cm and 9 cm. Find the hypotenuse exactly and to the nearest hundredth.
c2= 62 + 92 = 36 + 81 = 117c= √117 = √9 · 13 = 3√13c≈ 10.82c = 3√13 cm exactly, or about 10.82 cm. 117 is not a perfect square, so look for a square factor (here 9) to simplify. The method is on the square roots and radicals page.
Case 2: finding a missing leg
You know the hypotenuse and one leg. Rearranged, the formula is a = √c2 − b2: square both, subtract the leg's square from the hypotenuse's square, then take the root. More practice is on how to find a missing side.
Example 3: a whole-number answer
The hypotenuse is 25 and one leg is 24. Find the other leg.
a2= 252 − 242= 625 − 576= 49a= √49 = 7The other leg is 7. Notice how much shorter it is: when one leg is almost as long as the hypotenuse, the other must be short.
Example 4: an answer that does not simplify
The hypotenuse is 10 m and one leg is 7 m. Find the other leg.
b2= 102 − 72 = 100 − 49 = 51b= √51 ≈ 7.14b = √51 m, about 7.14 m. Because 51 = 3 × 17 has no square factor, √51 is already in simplest form.
Case 3: turned and hidden right triangles
Real problems rarely show a right triangle in the textbook position. Two situations come up again and again: a triangle drawn at an angle, and a right triangle hiding inside another shape.
Example 5: a turned triangle
In the left diagram the right angle is at the top. The side opposite it, 29, is the hypotenuse; 21 is a leg, and the unknown is the other leg.
x2= 292 − 212 = 841 − 441 = 400x= √400 = 20The missing leg is 20. If you had treated 29 as a leg and added, you would have got √841 + 441 ≈ 35.81 for the unknown side, longer than the side opposite the right angle, which is impossible.
Example 6: a hidden right triangle
An isosceles triangle has two sides of 10 and a base of 12. Find its height.
The height meets the base at a right angle and cuts it in half, creating a right triangle with hypotenuse 10 and one leg 6.
h2= 102 − 62 = 100 − 36 = 64h= √64 = 8The height is 8. The same idea works for any isosceles or equilateral triangle; see finding the height of a triangle.
Other common hiding places are the diagonal of a rectangle, the distance between two points on a grid and the slant edge of a roof. The word problems page shows how to sketch each one and find the right angle.
Check that your answer is reasonable
You do not need a calculator to catch most wrong answers. Before you finish, test the result against two facts that are true for every right triangle:
- The hypotenuse is longer than either leg.
- The hypotenuse is shorter than the two legs added together, because a straight line is the shortest path between two corners.
You can also estimate before calculating. In Example 2, c2 = 117 sits between 102 = 100 and 112 = 121, so c must be between 10 and 11, a bit closer to 11. When you are finding a leg, the check runs the other way: the leg must be shorter than the hypotenuse. For a deeper list of slips, see common Pythagorean theorem mistakes.
Calculator tips
The arithmetic is short, but calculators can trip you up in a few predictable ways:
- Make the square root cover the whole sum. Type
√(6² + 9²), closing the bracket after the last square. If you get 87, the calculator took the root of 62 alone: √62 + 92 = 6 + 81 = 87, not 10.82. - Use the x2 key, or multiply the number by itself. Typing
6 × 2gives 12, not 36. - On a basic or phone calculator, work in pieces. Some basic calculators work strictly left to right, so
6 × 6 + 9 × 9can come out as 405. Find each square separately, write them down, add or subtract, then press √. - In a spreadsheet or graphing app, type
=SQRT(6^2+9^2)orsqrt(6^2+9^2). - Round only at the end. If a problem has several steps, keep the full value (or the exact radical) until the final answer, then round to the precision asked for.
To check a result instantly, the Pythagorean theorem calculator shows each step, the exact radical and the decimal.
Printable checklist
Pythagorean theorem checklist
- Is there a right angle? Mark it.
- Mark the hypotenuse c: the side across from the right angle.
- Label the legs a and b, and the unknown side.
- Missing c? Add. Missing a leg? Subtract.
- Write a2 + b2 = c2, then substitute.
- Square each known side (multiply it by itself, do not double it).
- Add or subtract, then take the square root.
- Simplify the radical if there is one; round only if asked.
- Check: c is longest, and c is less than a + b.
- Write the units.
Copy it into your notes, or print this page. When the steps feel automatic, try the practice problems, which mix all three cases.
Frequently asked questions
What are the steps for solving the Pythagorean theorem?
Find the right angle and label the hypotenuse c and the legs a and b. Substitute the two known lengths into a2 + b2 = c2, square them, add (for c) or subtract (for a leg), take the square root, and check that the hypotenuse is the longest side.
How do I know whether to add or subtract?
Look at which side is unknown. If it is the hypotenuse, the side across from the right angle, add the squares. If it is one of the two sides touching the right angle, subtract the known leg's square from the hypotenuse's square.
Can I use the Pythagorean theorem if I only know one side?
Not on its own; you need two sides. With one side and an acute angle, use trigonometry instead (see Pythagoras or trig?). If the triangle is a special one, such as a 45-45-90 or 30-60-90 triangle, its fixed side ratios give the other sides from just one.
What do I do if the answer is not a whole number?
Leave it as a square root, simplified if possible (for example √117 = 3√13), or round the decimal to the place your teacher asks for. Most right triangles do not have whole-number sides, so this is normal, not a sign of a mistake.
How can I check my answer quickly?
The hypotenuse must be longer than each leg and shorter than their sum. For an exact check, square all three sides and confirm that the two smaller squares add up to the largest.
Keep exploring
- LearnThe Pythagorean Theorem FormulaThe Pythagorean theorem formula a² + b² = c²: what each letter means, the algebra to solve for any side, units, coordinate and 3D forms, and worked examples.
- LearnThe Hypotenuse: What It Is and How to Find ItWhat the hypotenuse of a right triangle is, why it is always the longest side, and how to find it with c = √(a² + b²): five worked examples plus a trig method.
- LearnHow to Find the Missing Side of a Right TriangleHow to find a missing leg of a right triangle with a = √(c² − b²): why you subtract, five worked examples, a mental-math shortcut and impossible inputs.
- LearnCommon Pythagorean Theorem MistakesTwelve common Pythagorean theorem mistakes, from a + b = c to misusing the converse, each with a wrong-vs-right worked example and a final self-check list.
- PracticePythagorean Theorem ExamplesFifteen Pythagorean theorem examples solved step by step, from finding the hypotenuse to 3D diagonals, coordinates and algebra, each with a diagram and answer.
- CalculatorsPythagorean Theorem CalculatorFree Pythagorean theorem calculator. Enter any two sides of a right triangle to find the third, with step-by-step working, exact radical answers and a drawing.