This Pythagorean theorem calculator finds any missing side of a right triangle, plus its angles, area and perimeter.
This free Pythagorean theorem calculator finds the missing side of any right triangle for students, DIYers, builders and engineers, in metric or imperial units. It applies the Pythagorean theorem, a² + b² = c², to solve for the hypotenuse or either leg. It then adds both acute angles, the area, the perimeter and the height to the hypotenuse, and shows each step so you can copy the working.
Quick answer: In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². To find the hypotenuse, square both legs, add them and take the square root. With legs of 1.2 m and 3.5 m, this Pythagorean theorem calculator gives c = √13.69 = 3.7 m.

In This Guide
What Is a Pythagorean Theorem Calculator?
A Pythagorean theorem calculator is a right triangle calculator that works out the length of one side when you know the other two. It only applies to triangles with a 90° angle. The two sides that form the right angle are the legs, a and b, and the longest side, opposite the right angle, is the hypotenuse, c.
The formula in plain words: the hypotenuse is the square root of leg a squared plus leg b squared, c = √(a² + b²). To find a leg, subtract the square of the known leg from the square of the hypotenuse and take the square root, a = √(c² − b²). The rule is named after the Greek thinker Pythagoras, born around 570 BC, although Babylonian scribes used it more than a thousand years earlier.
How to Use the Pythagorean Theorem Calculator
Step 1: Choose the Side to Find
Pick hypotenuse c if you know both legs, or leg a or leg b if you know the hypotenuse and one leg. The input for the side you are solving disappears, so you only fill in what you know.

Step 2: Pick Metric or Imperial Units
Choose millimetres, centimetres, metres or kilometres, or switch to inches, feet, yards or miles. Both sides must use the same unit. The answer is also converted to the other system underneath the result.

Step 3: Enter the Two Known Sides
Type the two lengths you know. Decimals are fine. If a leg is longer than the hypotenuse, the tool warns you, because no right triangle can have that shape.

Step 4: Read the Results and Working
The Pythagorean theorem calculator shows the missing side in large type, rounded to your chosen decimal places. Below are both acute angles, the area, the perimeter, the height to the hypotenuse, whether the sides form a whole number triple, and the full squared and square root working.

How Do You Find the Hypotenuse?
You find the hypotenuse by squaring both legs, adding the results and taking the square root of the total. For legs of 9 cm and 12 cm: 81 + 144 = 225, and √225 = 15 cm. If you want to see how a square root like √74 is found, the square root calculator explains the method in detail. A hypotenuse calculator saves time when the total is not a perfect square, for example √(5² + 7²) = √74 ≈ 8.602, which this page rounds to your chosen decimal places.
How Do You Find a Missing Leg?
To find a missing leg with or without a hypotenuse calculator, square the hypotenuse, subtract the square of the known leg and take the square root. For a hypotenuse of 26 ft and a leg of 10 ft: 676 − 100 = 576, and √576 = 24 ft. Always subtract from the hypotenuse; adding the squares here is the most common exam mistake and gives a side longer than the hypotenuse, which is impossible.
Worked example: Hannah is a decorator who needs to reach 4 m up a wall, with the foot of her ladder 1 m from the wall for safety. The ladder is the hypotenuse: √(4² + 1²) = √17 = 4.123 m, or about 13 ft 6 in. She chooses a ladder of at least 4.2 m to allow for the top rungs. The angle at the ground is 76°, close to the 75° often advised for leaning ladders.
What Are Pythagorean Triples?
Pythagorean triples are sets of three whole numbers that fit a² + b² = c² exactly, such as 3, 4 and 5. Multiplying a triple by any number gives another, so 6, 8 and 10 also works. A full list and the formula that generates them appear in the article on Pythagorean triples for anyone who wants to go further. The table lists common primitive triples, which have no shared factor, and the Pythagorean theorem calculator flags any whole number triple it finds.
| Leg a | Leg b | Hypotenuse c | Check: a² + b² = c² |
|---|---|---|---|
| 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 |
| 12 | 35 | 37 | 144 + 1,225 = 1,369 |
| 9 | 40 | 41 | 81 + 1,600 = 1,681 |
How Do Builders Use the 3 4 5 Rule?
Builders use the 3 4 5 rule to check that a corner is square: measure 3 units along one side, 4 units along the other, and the diagonal between the marks should be exactly 5. This is the converse of the theorem, which says that if the sides fit a² + b² = c², the angle is 90°. For larger rooms, use 6, 8 and 10 or 9, 12 and 15 for better accuracy, or enter your real measurements into this right triangle calculator to see how far a corner is out of square.
The same theorem measures straight line distances on a grid, because the horizontal and vertical gaps form the legs. For points in three dimensions, the 3D coordinate distance calculator extends it with a third squared term. When you know an angle instead of a second side, the trigonometry tool on this site uses sine, cosine and tangent. Formulas and triples checked October 2026.
Key Right Triangle Terms Explained
These terms explain the parts of a right triangle that this Pythagorean theorem calculator works with, from legs and hypotenuse to triples and angles.
- Hypotenuse
- The longest side of a right triangle, opposite the 90° angle. It is always c in the formula a² + b² = c², so with legs of 1.2 m and 3.5 m the hypotenuse is 3.7 m.
- Leg
- Either of the two shorter sides of a right triangle, which meet to form the right angle. Their lengths multiplied together and halved give the area of the triangle.
- Right triangle
- A triangle with one angle of exactly 90°. Its other two angles always add up to 90°, and its sides always satisfy the Pythagorean theorem, which no other kind of triangle does.
- Pythagorean triple
- Three whole numbers that fit a² + b² = c² exactly, such as 5, 12 and 13. A primitive triple has no common factor, and any multiple of a triple is also a triple.
- Square root
- The number that gives the original value when multiplied by itself, written with the √ sign. It is the final step in Pythagoras, turning c² = 13.69 into c = 3.7.
</>Embed this calculator on your website
Add the free Pythagorean Theorem Calculator to your own site or blog. Copy the code below and paste it into an HTML block. It resizes itself and works on phones.
How we checked this tool: Zahid Awais built this tool, checked it against the official rules or published standards where they apply, and tested it against worked examples. Results are estimates for planning, not personal financial or tax advice. Read our editorial policy and disclaimer, or report an error.
Related Tools and Guides
- Ratio Calculator
- How to Calculate Area
- How to Find the Area of a Circle From Radius, Diameter or Circumference
- Unit Price Comparison Calculator
- Everyday Maths Calculators
- Triangle Calculator
Frequently Asked Questions
What is the Pythagorean theorem formula?
The formula is a² + b² = c², where a and b are the legs of a right triangle and c is the hypotenuse, the longest side opposite the 90° angle. Rearranged, c = √(a² + b²) and a = √(c² − b²).
Does the Pythagorean theorem work for all triangles?
No. It only works for right triangles, which have one 90° angle. For other triangles, use the law of cosines, c² = a² + b² − 2ab cos C, which reduces to Pythagoras when C is 90°.
How do I know which side is the hypotenuse?
The hypotenuse is always the longest side and sits directly opposite the right angle. The two sides that meet at the right angle are the legs, and it does not matter which one you call a or b.
Can a Pythagorean theorem calculator give decimal answers?
Yes. Most combinations of sides do not form whole number triples, so the answer is usually an irrational number such as √74 ≈ 8.602. This tool lets you round to 0 to 6 decimal places.
How do you check if a triangle is a right triangle?
Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle has a right angle. For sides 20, 21 and 29, 400 + 441 = 841 = 29², so it does.
What units should I use?
Use any unit of length, but keep both known sides in the same unit. The answer comes out in that unit, and the area in square units, such as square metres or square feet.