Pythagorean Theorem Calculator
A right triangle with legs of 3 and 4 has a hypotenuse of 5. This Pythagorean theorem calculator solves any right triangle using the relationship a squared plus b squared equals c squared, where a and b are the two legs that meet at the right angle and c is the hypotenuse across from it. Choose hypotenuse mode to enter the two legs and find the longest side, or choose leg mode to enter the hypotenuse and one known leg and find the leg that is missing. Along with the side you are solving for, the tool returns the triangle area and its perimeter, so a single calculation gives you the full shape rather than just one number. Every result is rounded to four decimal places, which is precise enough for homework, construction layout, and quick design checks while still staying readable. Enter your known measurements in any consistent unit, feet, meters, inches, or plain numbers, and read the answer in that same unit.
Quick answer
The Pythagorean theorem says a squared plus b squared equals c squared for any right triangle, where c is the hypotenuse.
What this tells you
- •The Pythagorean theorem says a squared plus b squared equals c squared for any right triangle, where c is the hypotenuse.
- •The hypotenuse is always the longest side and always sits opposite the 90 degree angle.
- •To find the hypotenuse, add the squares of the two legs and take the square root of the total.
- •To find a missing leg, subtract the square of the known leg from the square of the hypotenuse, then take the square root.
- •The theorem only works on right triangles, so one angle must be exactly 90 degrees for the answer to be valid.
- •This tool also returns area as one half times the two legs and perimeter as the sum of all three sides.
How to Use
- 11. Pick a mode. Choose Find hypotenuse when you know both legs, or Find a leg when you know the hypotenuse and one leg.
- 22. Enter your first known value. In hypotenuse mode this is leg a, and in leg mode this is the hypotenuse c.
- 33. Enter your second known value. In hypotenuse mode this is leg b, and in leg mode this is the known leg a.
- 44. Keep your units consistent. Use the same unit for every side, since the calculator returns its answer in that same unit.
- 55. Read the results. The primary result is the side you solved for, and the secondary values show the triangle area and perimeter.
How It Works
Formula
a² + b² = c² → c = √(a² + b²), b = √(c² - a²)The Pythagorean theorem links the three sides of a right triangle. The two shorter sides, called legs, are labeled a and b, and the longest side, opposite the right angle, is the hypotenuse c. Squaring each leg and adding the results gives the square of the hypotenuse, so c equals the square root of a squared plus b squared. Rearranging the same equation lets you solve for a missing leg instead. If you know the hypotenuse and one leg, the other leg equals the square root of the hypotenuse squared minus the known leg squared. Because a real triangle cannot have a leg longer than its hypotenuse, leg mode requires the hypotenuse to be strictly greater than the known leg. Area is computed as one half the product of the two legs, and perimeter is the sum of all three sides.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
The classic 3-4-5 triangle
Squaring the legs gives 9 and 16, which add to 25. The square root of 25 is exactly 5, so the hypotenuse is 5. The area is one half times 3 times 4, which is 6, and the perimeter is 3 plus 4 plus 5, which is 12. This 3-4-5 set is the most familiar Pythagorean triple.
A 5-12-13 triangle
The squares of 5 and 12 are 25 and 144, which sum to 169. The square root of 169 is 13, another whole-number hypotenuse. The area works out to one half times 5 times 12, which is 30, and by coincidence the perimeter of 5 plus 12 plus 13 is also 30.
Finding a missing leg
With a hypotenuse of 10 and one leg of 6, subtract 36 from 100 to get 64. The square root of 64 is 8, so the missing leg is 8. That produces a 6-8-10 triangle, which is the 3-4-5 triple scaled by two, with an area of 24 and a perimeter of 24.
A non-integer answer
Two legs of length 1 give squares that add to 2, and the square root of 2 is about 1.4142. This is the diagonal of a unit square, an irrational number that the calculator rounds to four decimals. The area is one half, and the perimeter is 1 plus 1 plus 1.4142.
Common Pythagorean Triples
Whole-number right triangles where the two legs and the hypotenuse are all integers.
| Leg a | Leg b | Hypotenuse c | Notes |
|---|---|---|---|
| 3 | 4 | 5 | The base triple most people learn first |
| 6 | 8 | 10 | The 3-4-5 triple scaled by two |
| 5 | 12 | 13 | A common triple in geometry problems |
| 8 | 15 | 17 | Larger triple used in construction checks |
| 7 | 24 | 25 | A steep, narrow right triangle |
| 9 | 12 | 15 | The 3-4-5 triple scaled by three |
| 20 | 21 | 29 | A near-isosceles right triangle |
Any multiple of a Pythagorean triple is also a triple, so 3-4-5 scales up to 6-8-10, 9-12-15, and beyond. These sets are handy for checking that a corner is square without a protractor.
Where the Pythagorean theorem shows up in real life
The Pythagorean theorem is one of the most widely used results in all of mathematics, and its reach goes far beyond the geometry classroom. Builders and carpenters use the 3-4-5 rule to confirm that a wall corner or a foundation is truly square. By measuring 3 units along one edge, 4 units along the other, and checking that the diagonal between those marks is exactly 5 units, they verify a perfect right angle without any special equipment.
The theorem is also the foundation of the distance formula used in coordinate geometry. The straight-line distance between two points is just the hypotenuse of a right triangle whose legs are the horizontal and vertical gaps between them. That same idea powers navigation, computer graphics, and physics, anywhere you need the shortest path between two positions on a plane.
In everyday problem solving, the theorem answers practical questions such as how long a ladder must be to reach a given window height, whether a television will fit a diagonal measurement, or how much cable is needed to run from a rooftop anchor to a ground stake. Any time a right angle appears between two known measurements, the third side is one calculation away.
Common mistakes
- Mixing up which side is the hypotenuse. The hypotenuse is always the longest side and sits opposite the right angle, so never use it as a leg when adding squares.
- Adding the sides instead of adding their squares. The theorem uses a squared plus b squared, not a plus b, so squaring each side before summing is essential.
- Applying the theorem to a triangle that is not right-angled. The relationship a squared plus b squared equals c squared only holds when one angle is exactly 90 degrees.
- Entering a leg that is longer than the hypotenuse in leg mode. A leg can never exceed the hypotenuse, so the calculator returns nothing until the hypotenuse is the larger value.
- Forgetting to take the square root at the end. Adding or subtracting the squares gives c squared or b squared, and you must take the square root to get the actual side length.
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="pythagorean-theorem-calculator" async></script>Preview the embed at /embed/pythagorean-theorem-calculator/.