If you’re staring at a right triangle and one of the side lengths is missing, you’re dealing with one of the most useful formulas in all of geometry. The Pythagorean theorem has been around for over two thousand years, and it still shows up everywhere — in math class, on standardized tests, in construction, and in science. The good news is that it’s one of the simplest formulas you’ll ever learn, and once you understand it, you’ll find yourself using it far beyond geometry homework.
Our Pythagorean theorem calculator does the heavy lifting for you. Enter any two sides of a right triangle and it instantly finds the third, showing every step of the working so you can follow along and learn the method. Whether you need the hypotenuse (the longest side) or a missing leg, you get a clean answer, the full arithmetic behind it, and a result you can trust for your homework, quizzes, and exams.
Pythagorean Theorem Calculator
Choose what to solve for, enter the two known sides, and get the missing side.
1. What Is the Pythagorean Theorem?
The Pythagorean theorem is a rule about right triangles — triangles that contain one right angle (90 degrees). It says that the square of the hypotenuse equals the sum of the squares of the other two sides. Those other two sides are called legs, and the hypotenuse is always the side opposite the right angle and always the longest side of the triangle.
The theorem is named after Pythagoras, the ancient Greek mathematician who led a school of thinkers in the 6th century BCE. While the relationship itself was known to earlier civilizations, Pythagoras and his followers worked out why it holds true, and the proof has fascinated students ever since. One way to picture it: imagine drawing a square on each side of a right triangle. The area of the square built on the hypotenuse is exactly equal to the areas of the two squares built on the legs, added together. That visual is where the “squared” in the formula comes from.
It helps to know the language clearly before you start solving problems. In a right triangle, the two sides that form the right angle are the legs, usually labeled a and b. The side across from the right angle is the hypotenuse, labeled c. The formula a² + b² = c² ties all three together. If you know any two of them, you can always find the third. That’s the entire job of a Pythagorean theorem calculator: you give it two sides, and it works out the missing one with the correct arithmetic.
Students run into this theorem constantly. It appears in geometry, algebra, trigonometry, and even physics. Distance problems are really Pythagoras in disguise. The diagonal of a rectangle, the length of a ramp, the height a ladder reaches on a wall — all of these reduce to finding a side of a right triangle. Learning the theorem now pays off across your whole math education, so it’s worth getting comfortable with it early.
2. How to Use the Pythagorean Theorem Calculator
Using the calculator takes less than a minute. Here’s exactly how it works, step by step.
Step 1: Choose your mode. Decide which side you’re missing. If you know both legs and need the hypotenuse, select “Find hypotenuse (c)”. If you know the hypotenuse and one leg, select “Find missing leg”. Picking the right mode matters because the arithmetic is different in each case.
Step 2: Enter your two known sides. Type the lengths into the input fields. Both numbers must be positive — a side length can’t be zero or negative. In leg mode, the calculator also checks that your hypotenuse is longer than your leg. That check exists for a reason: in a real right triangle, the hypotenuse is always the longest side, so if you accidentally entered the leg value where the hypotenuse goes, the tool will flag it instead of giving you a nonsense answer.
Step 3: Read your result. The calculator shows the missing side, the formula with your numbers plugged in, and the step-by-step working. You don’t just get an answer; you get the path to the answer, which is exactly what teachers want to see on homework.
Step 4: Check the working against your own hand calculation. Use the shown steps as a study aid. Work the problem yourself, then compare. When your steps match the calculator’s steps, you’ve learned the method — and that’s what actually earns points on a test where you won’t have a calculator.
One practical note: keep your units consistent. If one side is in inches and another in feet, convert first. The calculator assumes all inputs share the same unit, and mixing units is one of the most common sources of wrong answers in geometry problems.
3. The Formula, With Worked Examples
The core formula is a² + b² = c². Here’s what each letter means: a and b are the legs (the two sides that meet at the right angle), and c is the hypotenuse (the side opposite the right angle). To find the hypotenuse, you rearrange the formula into c = √(a² + b²). Square both legs, add the results, and take the square root of the sum.
Let’s work a real example. Suppose a right triangle has legs of 3 and 4. Find the hypotenuse.
Start by squaring each leg. Three squared is 3 × 3 = 9. Four squared is 4 × 4 = 16. Add the squares together: 9 + 16 = 25. Finally, take the square root of 25, which is 5. So the hypotenuse is 5. The full working looks like this: c = √(3² + 4²) = √(9 + 16) = √25 = 5.
Now the other direction. Suppose you know the hypotenuse is 13 and one leg is 5. Find the missing leg. The rearranged formula is a = √(c² − b²): square the hypotenuse, subtract the square of the known leg, and take the square root of the difference.
Square the hypotenuse: 13 × 13 = 169. Square the known leg: 5 × 5 = 25. Subtract: 169 − 25 = 144. Take the square root of 144, which is 12. The missing leg is 12. In symbols: a = √(13² − 5²) = √(169 − 25) = √144 = 12.
Here’s one more, with numbers that don’t come out quite so neatly. A ladder leans against a wall. The ladder is 10 feet long and its base sits 6 feet from the wall. How high up the wall does it reach? The ladder is the hypotenuse (10), the distance from the wall is one leg (6), and the height is the missing leg. Square the hypotenuse: 10 × 10 = 100. Square the known leg: 6 × 6 = 36. Subtract: 100 − 36 = 64. Take the square root: √64 = 8. The ladder reaches 8 feet up the wall. Once you’re comfortable with right triangles, try our area calculator — it handles triangles, rectangles, circles, and more, showing the formula and steps for each.
4. Common Pythagorean Triples Worth Memorizing
A Pythagorean triple is a set of three whole numbers that fit the theorem exactly — like 3, 4, and 5. Triples are worth memorizing because they show up constantly on quizzes and timed tests. When you recognize one, you can skip most of the arithmetic and jump straight to the answer.
The most common triples are:
| Leg a | Leg b | Hypotenuse c | Check |
|---|---|---|---|
| 3 | 4 | 5 | 9 + 16 = 25 |
| 5 | 12 | 13 | 25 + 144 = 169 |
| 8 | 15 | 17 | 64 + 225 = 289 |
| 7 | 24 | 25 | 49 + 576 = 625 |
| 6 | 8 | 10 | 36 + 64 = 100 |
| 9 | 12 | 15 | 81 + 144 = 225 |
| 20 | 21 | 29 | 400 + 441 = 841 |
| 9 | 40 | 41 | 81 + 1600 = 1681 |
Notice that 6-8-10 and 9-12-15 are just scaled-up versions of 3-4-5 — multiply each side of a triple by the same number and it stays a triple. That scaling trick is genuinely useful. If a problem gives you legs of 6 and 8, recognize the 3-4-5 pattern doubled, and you know the hypotenuse is 10 without touching a calculator. On a timed test, that kind of pattern recognition saves real minutes. When a problem doesn’t resolve to a neat triple, work it by hand and compare your method with the step-by-step style you’ll see in our area calculator, which shows its working for every shape too.
5. Where You’ll Actually Use This
The Pythagorean theorem isn’t just a textbook exercise. Builders use it to check that corners are square: measure 3 feet along one wall and 4 feet along the other, and the diagonal should be exactly 5 feet if the corner is a true right angle. Carpenters, landscapers, and anyone laying out a foundation rely on the 3-4-5 trick daily.
It also powers the distance formula you meet in algebra. The distance between two points on a coordinate grid is just the hypotenuse of a right triangle whose legs are the horizontal and vertical gaps between the points. Once you see that connection, coordinate geometry problems become much less intimidating — they’re the same theorem you’ve already learned, wearing different clothes.
Screen sizes are another everyday example. A TV advertised as 55 inches is measured diagonally across the screen. That diagonal is the hypotenuse of a right triangle formed by the screen’s width and height. Navigation uses the same idea: if you walk 3 miles east and 4 miles north, you’re 5 miles from where you started, as the crow flies. The theorem turns two separate measurements into one direct answer.
6. Tips for Getting the Right Answer Every Time
Label your sides before you calculate. The single most helpful habit is writing down which side is a, which is b, and which is c before touching any numbers. Most errors in Pythagoras problems aren’t arithmetic errors — they’re labeling errors. Identify the hypotenuse first (it’s opposite the right angle and the longest side), and the rest falls into place.
Don’t round until the very end. If your numbers produce a messy square root, carry the full value through your working and round only the final answer. Rounding intermediate steps compounds the error and can push your final answer off by enough to lose credit. When a problem asks for an exact answer, leave it in radical form — for example, √50 can be simplified to 5√2 instead of being approximated.
Sanity-check the size of your answer. The hypotenuse must be longer than either leg but shorter than the sum of the legs. A missing leg must be shorter than the hypotenuse. If your answer violates either rule, you mixed up your sides or your arithmetic somewhere. This thirty-second check catches the majority of mistakes.
Keep units consistent and carry them through. If the problem gives centimeters, your answer is in centimeters. If it gives feet, your answer is in feet. Convert before you calculate, never after, because converting squared values mid-problem is a recipe for confusion.
Show your working, even when a calculator gives the answer. Teachers award partial credit for correct steps, and showing the formula with your numbers substituted in is what turns a bare answer into full marks. The step-by-step output on this page is formatted the way most teachers expect to see it.
7. Common Mistakes to Avoid
Using the theorem on triangles that aren’t right triangles. The formula a² + b² = c² applies only when the triangle has a right angle. If the problem doesn’t say the triangle is a right triangle — or mark the right angle with the little square symbol — you can’t use this theorem. For other triangles, you’d need the Law of Cosines instead.
Forgetting the final square root. This is the classic error. Students square the sides, add them up, and stop at 25 — writing 25 instead of 5. Remember: the formula gives you c², not c. You must take the square root as the last step. The same applies when finding a leg: √(c² − b²), not just c² − b².
Treating a leg as the hypotenuse. In leg mode, make sure the value you enter as the hypotenuse really is the hypotenuse — the longest side, opposite the right angle. If you enter the leg as the hypotenuse, you’ll subtract the wrong way and get a wrong (or impossible) answer. When in doubt, the longest given side is the hypotenuse.
Squaring versus doubling. Squaring a number means multiplying it by itself (7² = 49), not multiplying it by 2 (7 × 2 = 14). This slips in more often than you’d expect, especially under time pressure. Write out the multiplication — 7 × 7 = 49 — until the habit is automatic.
Decimal and fraction slips. If your problem involves fractions or decimals, convert carefully before squaring. A problem with a side of 1.5 is fine: 1.5² = 2.25. But rushing the decimal point is easy, so double-check each squared value. Our fraction calculator can help if your sides are given as fractions and you need exact fractional arithmetic before taking the root.
8. Checking Your Answer
Every Pythagoras problem has a built-in way to verify itself. Take your answer, plug all three sides back into a² + b² = c², and see if both sides match. Using our earlier example: we found the hypotenuse of the 3-4 triangle to be 5. Check: 3² + 4² = 9 + 16 = 25, and 5² = 25. Both sides equal 25, so the answer is confirmed.
For the leg example: we found the missing leg to be 12, with hypotenuse 13 and other leg 5. Check: 5² + 12² = 25 + 144 = 169, and 13² = 169. It matches, so 12 is correct. This verification takes seconds and is the best habit you can build in geometry. It also mirrors what strong students do across all their subjects — if your math grades need attention, running the numbers through our final grade calculator shows exactly what you need on remaining assignments to hit your target.