How to Use the Pythagorean Theorem (With Examples)

Learn the Pythagorean theorem formula, how to find the hypotenuse or a missing leg step by step, how to spot Pythagorean triples, and where the theorem is used in real life.
Table of Contents 16 sections
- What is the Pythagorean theorem?
- How to find the hypotenuse
- How to find a missing leg
- How to check if a triangle is a right triangle
- Pythagorean triples
- Special right triangles
- The distance formula
- Real-life examples
- A simple visual proof
- Common mistakes
- Tips for Pythagorean theorem word problems
- Practice problems
- Why the Pythagorean theorem matters
- Solve it instantly
- How to use this guide
- Frequently asked questions
The Pythagorean theorem is one of the most useful formulas in all of mathematics. It lets you find a missing side of any right triangle, check that a corner is square, work out the diagonal of a screen or a room, and measure the straight-line distance between two points. This guide explains what the Pythagorean theorem is, how to use it to find the hypotenuse and a missing leg, how to recognize Pythagorean triples, and how the theorem shows up in real life, with worked examples and practice problems at the end.
What is the Pythagorean theorem?
The Pythagorean theorem states that in a right triangle, the square of the length of the hypotenuse is equal to the sum of the squares of the lengths of the other two sides.
A right triangle has one 90 degree angle, usually marked with a small square. The two sides that form the right angle are called the legs (a and b). The side across from the right angle is the hypotenuse (c), and it is always the longest side. It does not matter which leg you call a and which you call b, but c must be the hypotenuse.
How to find the hypotenuse
- Identify the legs. These are the two sides that meet at the right angle.
- Square each leg. Multiply each length by itself.
- Add the squares.
- Take the square root of the sum. That is the hypotenuse.
Example: a right triangle has legs of 9 and 12. Then 9² = 81 and 12² = 144. Adding them gives 225, and √225 = 15. The hypotenuse is 15.
Example with decimals: legs of 4.2 m and 7.5 m. 4.2² = 17.64 and 7.5² = 56.25, a sum of 73.89. √73.89 = 8.60 m.
How to find a missing leg
If you know the hypotenuse and one leg, rearrange the formula: a² = c² - b².
- Square the hypotenuse.
- Square the known leg.
- Subtract the leg's square from the hypotenuse's square.
- Take the square root of the difference.
Example: the hypotenuse is 25 and one leg is 7. 25² = 625 and 7² = 49, so the other leg is √(625 - 49) = √576 = 24.
How to check if a triangle is a right triangle
The theorem works in reverse. Take the three side lengths, square the two shorter sides and add them, then compare the result with the square of the longest side.
- If a² + b² = c², the triangle is a right triangle.
- If a² + b² > c², it is an acute triangle (all angles under 90°).
- If a² + b² < c², it is an obtuse triangle (one angle over 90°).
Sides 10, 24 and 26: 100 + 576 = 676 = 26², so it is a right triangle. Sides 5, 6 and 9: 25 + 36 = 61, which is less than 81, so the triangle is obtuse.
Pythagorean triples
Pythagorean triples are whole-number solutions to a² + b² = c². The most famous is 3-4-5. Others include 5-12-13, 8-15-17, 7-24-25, 20-21-29 and 9-40-41. Multiplying every number in a triple by the same factor gives another triple, which is why 6-8-10 and 15-20-25 also work. Spotting a triple on a test means you can write the answer without any arithmetic: if the legs are 15 and 20, the hypotenuse must be 25 because the sides are 5 times 3-4-5.
To build your own, use Euclid's formula with any two whole numbers m > n: a = m² - n², b = 2mn, c = m² + n². With m = 3 and n = 2 you get 5, 12, 13. With m = 5 and n = 2 you get 21, 20, 29.
Special right triangles
| Triangle | Side ratio | Example |
|---|---|---|
| 45-45-90 (isosceles right) | 1 : 1 : √2 | legs 7, hypotenuse 9.90 |
| 30-60-90 | 1 : √3 : 2 | short leg 4, long leg 6.93, hypotenuse 8 |
These ratios come straight from the Pythagorean theorem. In a 45-45-90 triangle with legs of 1, the hypotenuse is √(1 + 1) = √2. In a 30-60-90 triangle with hypotenuse 2 and short leg 1, the long leg is √(4 - 1) = √3.
The distance formula
To find the distance between two points (x₁, y₁) and (x₂, y₂) on a graph, draw a right triangle whose legs are the horizontal and vertical differences. The distance is the hypotenuse:
From (-2, 3) to (4, 11): the changes are 6 and 8, so d = √(36 + 64) = 10. The same idea extends to three dimensions. The longest diagonal of a box measuring l × w × h is √(l² + w² + h²); a 3 × 4 × 12 box has a space diagonal of √169 = 13.
Real-life examples
Squaring a deck or foundation
Mark 6 ft along one side from the corner and 8 ft along the other. If the distance between the two marks is exactly 10 ft, the corner is square. If it is more, the angle is wider than 90 degrees; if less, it is narrower.
Rafter length
A shed roof rises 4 ft over a horizontal run of 9 ft. The rafter must span √(16 + 81) = √97 = 9.85 ft, plus any overhang.
Ramp length
Accessibility guidelines in the US call for a maximum slope of 1:12 on wheelchair ramps. To rise 2 ft, the run must be at least 24 ft, so the ramp surface is √(4 + 576) = 24.08 ft long. The slope calculator helps you find the grade.
Screen size
A laptop display 13.6 inches wide and 8.5 inches tall has a diagonal of √(184.96 + 72.25) = √257.21 = 16.0 inches.
Shortest path
Crossing a 120 m by 50 m park diagonally instead of walking around two sides saves 170 - 130 = 40 meters, because the diagonal is √(14,400 + 2,500) = 130 m.
A simple visual proof
Draw a large square with sides a + b. Inside it, place four copies of the right triangle so that their hypotenuses form a smaller tilted square in the middle. The area of the large square is (a + b)² = a² + 2ab + b². It is also made of the four triangles, each with area ab/2, plus the middle square c², for a total of 2ab + c². Since both expressions describe the same area, a² + 2ab + b² = 2ab + c², and cancelling 2ab leaves a² + b² = c².
Common mistakes
- Using it on non-right triangles. Check for the right angle first.
- Labelling the wrong side as c. The hypotenuse is opposite the right angle.
- Squaring the sum instead of summing the squares. (3 + 4)² = 49, but 3² + 4² = 25.
- Forgetting to take the square root at the end.
- Rounding too early. Keep full precision until the last step.
Tips for Pythagorean theorem word problems
Most word problems hide a right triangle inside a story about ladders, ramps, rivers, kites or ships. Start by drawing a quick sketch and marking the right angle; walls meet the ground at 90 degrees, compass directions such as north and east are at right angles, and the height of a kite is measured straight down. Label the side you are looking for, decide whether it is the hypotenuse or a leg, and only then choose between adding and subtracting the squares. Write the units next to every number so you do not mix feet with inches. Finally, ask whether the answer is sensible: a ladder cannot reach higher than its own length, and a diagonal shortcut must be shorter than walking the two sides. These checks catch most errors before they cost marks.
Practice problems
- Legs of 16 and 30. Find the hypotenuse. Answer: √(256 + 900) = √1,156 = 34.
- Hypotenuse 41, one leg 9. Find the other leg. Answer: √(1,681 - 81) = √1,600 = 40.
- Is a triangle with sides 11, 60 and 61 a right triangle? Answer: 121 + 3,600 = 3,721 = 61², so yes.
- A 10 ft ladder reaches 8 ft up a wall. How far is its base from the wall? Answer: √(100 - 64) = 6 ft.
- Find the distance between (0, 0) and (5, -12). Answer: √(25 + 144) = 13.
Why the Pythagorean theorem matters
The theorem is more than a classroom exercise. GPS receivers, video games and computer graphics use the distance formula millions of times a second to work out how far apart two points are. Surveyors use it to lay out property lines, and engineers use it to calculate the forces in bridges and roof trusses, where loads split into horizontal and vertical parts that combine like the legs of a triangle. Even your phone's screen size is a Pythagorean result. Learning it well pays off in algebra, geometry, trigonometry and physics.
Solve it instantly
The free Pythagorean theorem calculator finds the hypotenuse or any missing leg in one click, and shows the angles, area, perimeter and full working. For area problems, try the square footage calculator, and explore the rest of our math calculators.
How to use this guide
Work through the steps in order with your own numbers, writing each result down as you go, then check your answer against the matching calculator on this site. If your hand calculation and the calculator disagree, the usual culprits are unit conversions, rounding, and a percentage typed as a whole number instead of a decimal. The examples are illustrations, not recommendations, and your situation may call for different assumptions. For important financial or health decisions, confirm your plan with a licensed professional who knows your circumstances. This article is reviewed periodically and was last updated in November 2026.
Frequently asked questions
How do you use the Pythagorean theorem?
Square the two legs of a right triangle, add them, and take the square root to get the hypotenuse. To find a leg, subtract the other leg's square from the hypotenuse's square and take the square root.
What is the formula for the Pythagorean theorem?
a² + b² = c², where a and b are the legs and c is the hypotenuse.
Can the Pythagorean theorem find angles?
Not directly. It finds side lengths. Once you know the sides, use trigonometry, such as angle = arctan(a / b), to find the angles.
What are examples of Pythagorean triples?
3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29, plus any multiple of these such as 6-8-10.
Who discovered the Pythagorean theorem?
It is named after Pythagoras of Samos, but Babylonian, Indian and Chinese mathematicians knew the relationship centuries earlier.
What is the hypotenuse of a triangle?
The longest side of a right triangle, opposite the 90 degree angle.
This Pythagorean theorem calculator is an educational tool. It applies to right triangles only; check measurements and rounding before using results for construction, navigation or exam answers.

About the author
Sawera Shahid is the founder and lead writer of Calculators360. She builds the site's free online calculators and writes clear, step-by-step guides on finance, math and health, with every formula explained and worked examples you can check by hand.



