A Pythagorean theorem calculator finds the missing side of a right triangle using a² + b² = c². Choose which side you need (a, b or the hypotenuse c), type the other two lengths and this free Pythagorean theorem calculator shows the answer, the area, perimeter, both acute angles and every step of the working.
Quick answer: with legs a = 3 and b = 4, c² = 3² + 4² = 9 + 16 = 25, so the hypotenuse is c = √25 = 5. To find a leg instead, subtract: a² = c² − b². The hypotenuse is always the longest side, opposite the 90° angle.

How to use this Pythagorean theorem calculator
Pick the side you want to find, then type the two sides you know. The answer appears as you type. Use the same unit for every length, or pick a unit from the list so the results carry the right label.
- Choose Hypotenuse c, Leg a or Leg b for the side you want. The matching boxes appear.
- Type the two known sides. Decimals such as 2.5 work, but the legs and hypotenuse must be positive.
- Read the missing side, then the area, perimeter, angles and the height to the hypotenuse.
- Open How it works to see each line of working, or choose Is it a right triangle? to test three lengths.
| Mode | You type | You get |
|---|---|---|
| Hypotenuse c | Legs a and b | c = √(a² + b²), area, perimeter, angles |
| Leg a or Leg b | The other leg and the hypotenuse | The missing leg, plus the same extras |
| Is it a right triangle? | Three sides in any order | Right, acute, obtuse or not a triangle, with the working |
If you enter a leg that is longer than the hypotenuse, the Pythagorean theorem calculator explains the problem instead of giving a wrong answer, because the hypotenuse is always the longest side of a right triangle.
Pythagorean theorem calculator with steps: how the working is laid out
Every result from the Pythagorean theorem calculator with steps follows the same classroom order. It names the hypotenuse, writes a² + b² = c², squares the known sides, adds or subtracts, takes the square root and then checks the answer by substituting it back. Radical form such as 6√2 appears whenever the square root is not a whole number, so you can copy the working into homework in the style your teacher expects.
Pythagorean theorem formula and how it works
The Pythagorean theorem formula says that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs. In symbols it is a² + b² = c², where a and b are the legs and c is the hypotenuse. Rearranged, it gives one formula for each missing side.
| To find | Formula | Condition |
|---|---|---|
| Hypotenuse c | c = √(a² + b²) | Any two legs |
| Leg a | a = √(c² − b²) | c must be longer than b |
| Leg b | b = √(c² − a²) | c must be longer than a |
Example 1: find the hypotenuse of a 5 by 7 triangle
- Write the theorem: a² + b² = c².
- Square each leg: 5² = 25 and 7² = 49.
- Add them: c² = 25 + 49 = 74.
- Take the square root: c = √74 ≈ 8.6023. Since 74 has no square factors, √74 cannot be simplified.
- Check: 25 + 49 = 74 and 8.6023² ≈ 74 ✓.
The area is ½ × 5 × 7 = 17.5 and the perimeter is 5 + 7 + 8.6023 = 20.6023. The Pythagorean theorem calculator also finds angle A = tan⁻¹(5 ÷ 7) ≈ 35.54° and angle B = 54.46°.
Example 2: find a missing leg
A right triangle has hypotenuse c = 20 and one leg b = 12. Then a² = c² − b² = 400 − 144 = 256, so a = √256 = 16. The area is ½ × 16 × 12 = 96, the perimeter is 48, and the angle opposite the 16 side is 53.13°. This is the 3-4-5 triangle multiplied by 4.
Example 3: simplest radical form
When both legs are 6, c² = 36 + 36 = 72 and c = √72. Since 72 = 36 × 2, √72 = 6√2 ≈ 8.4853. Many teachers want this exact form, and the Pythagorean theorem calculator prints it next to the decimal. An isosceles right triangle always has two 45° angles and a hypotenuse that is √2 times a leg.
Hypotenuse calculator: quick lookup table
This table works as a hypotenuse calculator for common leg lengths. Find the length of one leg down the side and the other across the top; the number is c rounded to two decimals, and whole numbers mean a Pythagorean triple.
| a b | 2 | 3 | 4 | 5 | 6 | 8 |
|---|---|---|---|---|---|---|
| 2 | 2.83 | 3.61 | 4.47 | 5.39 | 6.32 | 8.25 |
| 3 | 3.61 | 4.24 | 5 | 5.83 | 6.71 | 8.54 |
| 4 | 4.47 | 5 | 5.66 | 6.40 | 7.21 | 8.94 |
| 5 | 5.39 | 5.83 | 6.40 | 7.07 | 7.81 | 9.43 |
| 6 | 6.32 | 6.71 | 7.21 | 7.81 | 8.49 | 10 |
| 8 | 8.25 | 8.54 | 8.94 | 9.43 | 10 | 11.31 |
Right triangle calculator: area, perimeter and angles
Once all three sides are known, this right triangle calculator works out the rest. The area is ½ × a × b, the perimeter is a + b + c, and the height to the hypotenuse is a × b ÷ c. The two acute angles come from trigonometry: angle A = tan⁻¹(a ÷ b), and angle B = 90° − A, because the three angles of any triangle add to 180°.
| Triangle | Sides a, b, c | Area | Perimeter | Angle A | Angle B |
|---|---|---|---|---|---|
| 3-4-5 | 3, 4, 5 | 6 | 12 | 36.87° | 53.13° |
| 5-12-13 | 5, 12, 13 | 30 | 30 | 22.62° | 67.38° |
| 8-15-17 | 8, 15, 17 | 60 | 40 | 28.07° | 61.93° |
| 45-45-90 | 1, 1, 1.4142 | 0.5 | 3.4142 | 45° | 45° |
| 30-60-90 | 1, 1.7321, 2 | 0.866 | 4.7321 | 30° | 60° |
Two special right triangles come up so often that they are worth memorizing: the 45-45-90 triangle has sides in the ratio 1 : 1 : √2, and the 30-60-90 triangle has sides in the ratio 1 : √3 : 2.
How to find the missing side of a right triangle
To find the missing side of a right triangle, first decide whether it is a leg or the hypotenuse. If it is the hypotenuse (the side opposite the right angle), add the squares of the legs and take the square root. If it is a leg, subtract the square of the other leg from the square of the hypotenuse and take the square root. Never subtract when you want the hypotenuse, and never add when you want a leg.
Is it a right triangle? Test three sides
The converse of the theorem also holds: if a² + b² = c² for the three sides of a triangle, with c the longest, then it has a right angle. The calculator’s third mode sorts your sides, checks that they can form a triangle at all (the two shorter sides must add to more than the longest), and compares a² + b² with c².

| Sides | a² + b² | c² | Verdict |
|---|---|---|---|
| 9, 12, 15 | 225 | 225 | Right triangle |
| 5, 12, 13 | 169 | 169 | Right triangle |
| 7, 8, 9 | 113 | 81 | Acute (113 > 81) |
| 4, 5, 8 | 41 | 64 | Obtuse (41 < 64) |
| 1, 2, 3 | 5 | 9 | Not a triangle (1 + 2 is not more than 3) |
Check the first row: 9² + 12² = 81 + 144 = 225 = 15². In the third row the test uses the two shorter sides, 7 and 8: 49 + 64 = 113, which is greater than 9² = 81, so the largest angle is under 90°.
Pythagorean triples
Pythagorean triples are sets of three whole numbers that satisfy a² + b² = c². A primitive triple has no common factor, and every other triple is a multiple of one, so 6-8-10 and 9-12-15 are multiples of 3-4-5. Euclid’s formula generates them: for whole numbers m greater than n, with opposite parity and no common factor, the triple is (m² − n², 2mn, m² + n²). The sixteen primitive triples with a hypotenuse up to 100 are:
| a | b | c | m, n | Check |
|---|---|---|---|---|
| 3 | 4 | 5 | 2, 1 | 9 + 16 = 25 |
| 5 | 12 | 13 | 3, 2 | 25 + 144 = 169 |
| 8 | 15 | 17 | 4, 1 | 64 + 225 = 289 |
| 7 | 24 | 25 | 4, 3 | 49 + 576 = 625 |
| 20 | 21 | 29 | 5, 2 | 400 + 441 = 841 |
| 12 | 35 | 37 | 6, 1 | 144 + 1225 = 1369 |
| 9 | 40 | 41 | 5, 4 | 81 + 1600 = 1681 |
| 28 | 45 | 53 | 7, 2 | 784 + 2025 = 2809 |
| 11 | 60 | 61 | 6, 5 | 121 + 3600 = 3721 |
| 33 | 56 | 65 | 7, 4 | 1089 + 3136 = 4225 |
| 16 | 63 | 65 | 8, 1 | 256 + 3969 = 4225 |
| 48 | 55 | 73 | 8, 3 | 2304 + 3025 = 5329 |
| 13 | 84 | 85 | 7, 6 | 169 + 7056 = 7225 |
| 36 | 77 | 85 | 9, 2 | 1296 + 5929 = 7225 |
| 39 | 80 | 89 | 8, 5 | 1521 + 6400 = 7921 |
| 65 | 72 | 97 | 9, 4 | 4225 + 5184 = 9409 |
The oldest evidence that people knew these triples is a clay tablet from ancient Babylon called Plimpton 322, whose columns of numbers are linked to such triples, made more than a thousand years before Pythagoras.
Real-life uses of the Pythagorean theorem

- Ladders: the common 4-to-1 rule puts the base 1 foot from the wall for every 4 feet of height. For a rise of 12 feet the base is 3 feet out, so the ladder needs at least √(12² + 3²) = √153 ≈ 12.37 feet just to reach a point 12 feet up, and about 3 feet more if you will climb onto a roof or landing.
- Screens: a TV is sold by its diagonal. For a 55-inch 16:9 set the width is 55 × 16 ÷ √(16² + 9²) ≈ 47.94 inches and the height is about 26.96 inches.
- Squaring a corner: carpenters mark 3 feet along one wall and 4 feet along the other. If the diagonal between the marks is exactly 5 feet, the corner is square. Larger versions, 6-8-10 or 9-12-15, are more accurate on big layouts.
- Roofs: a roof with a run of 12 feet and a rise of 5 feet has a rafter length of √(144 + 25) = 13 feet, before any overhang.
- Sports: a baseball diamond has 90-foot sides, so the throw from home plate to second base is √(90² + 90²) ≈ 127.28 feet.
- Rooms and maps: the diagonal of a 12 by 15 foot room is √369 ≈ 19.21 feet, which is also the straight-line distance on a grid.
The ladder rule is taught in workplace safety guidance such as the Canadian Center for Occupational Health and Safety; see the sources below.
Pythagorean theorem calculator with angle: finding A and B
The theorem gives lengths, not angles, but once two sides are known the Pythagorean theorem calculator adds the angles. Angle A, opposite side a, satisfies tan A = a ÷ b, so A = tan⁻¹(a ÷ b). For the 3-4-5 triangle that is tan⁻¹(0.75) ≈ 36.87°, and the other acute angle is 90° − 36.87° = 53.13°. You can check with sine too: sin A = a ÷ c = 3 ÷ 5 = 0.6.
Pythagorean theorem and the distance formula
The distance between two points on a graph is the hypotenuse of a right triangle whose legs are the horizontal and vertical differences. From (1, 2) to (4, 6) the legs are 3 and 4, so the distance is √(3² + 4²) = 5. Type the two differences into the Pythagorean theorem calculator as legs a and b to get any distance on a grid.
Pythagorean theorem calculator in feet and inches
The theorem works in any unit as long as all the lengths use the same one. For feet and inches, convert everything to inches first: a 5 ft 6 in leg is 66 inches. Calculate in inches, then convert the answer back by dividing by 12. In the ladder example, 12.37 feet is 12 feet plus 0.37 × 12 ≈ 4.4 inches. Pick feet, inches, meters or any other unit in the Pythagorean theorem calculator and the results are labeled to match.
Does the Pythagorean theorem work on any triangle?
No. The theorem applies only to right triangles. For other triangles use the law of cosines, c² = a² + b² − 2ab cos C, which reduces to the Pythagorean theorem when C = 90° because cos 90° = 0. The Pythagorean theorem calculator uses the law of cosines for the angles in its three-sides mode.
Common mistakes with the Pythagorean theorem
- Using the wrong side as c. The hypotenuse is always the longest side, opposite the right angle.
- Forgetting the square root. a² + b² gives c², not c.
- Adding when you need a leg. To find a leg you subtract: c² − b².
- Mixing units. Convert feet and inches to one unit before squaring.
- Assuming a right angle. The triangle must actually have a 90° angle.
Frequently asked questions
11 quick answers
What is the Pythagorean theorem?
The Pythagorean theorem states that in a right triangle the square of the hypotenuse equals the sum of the squares of the legs: a² + b² = c².
How does the Pythagorean theorem calculator work?
It squares the two known sides, then adds them to find c² or subtracts to find a leg, and takes the square root. This Pythagorean theorem calculator also shows each step, the area, perimeter and both acute angles.
How do you find the hypotenuse?
Square both legs, add the results and take the square root. For legs 6 and 8, c = √(36 + 64) = √100 = 10.
How do you find a missing leg?
Square the hypotenuse, subtract the square of the known leg, and take the square root. With c = 17 and b = 8, a = √(289 − 64) = √225 = 15.
Which side is the hypotenuse?
The hypotenuse is the side opposite the right angle, and it is always the longest side of the triangle. In the formula it is c.
Can the Pythagorean theorem find an angle?
Not by itself. It gives side lengths. Once you know the sides, an angle comes from trigonometry: angle A = tan⁻¹(a ÷ b). The Pythagorean theorem calculator does this for you.
What are Pythagorean triples?
They are sets of three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Any multiple of a triple is also a triple.
How do I know if three sides make a right triangle?
Sort them, then check whether the two smaller squares add up to the largest square. For 5, 12 and 13, 25 + 144 = 169, so yes. Use the third mode of the Pythagorean theorem calculator.
Can the calculator use decimals and different units?
Yes. The Pythagorean theorem calculator accepts decimals such as 2.5 and lets you choose inches, feet, meters or another unit. Keep every side in the same unit.
Does it work for the diagonal of a rectangle or a screen?
Yes. The diagonal is the hypotenuse of a right triangle whose legs are the width and height, so a 12 by 15 rectangle has a diagonal of √369 ≈ 19.21.
Is the Pythagorean theorem the same as the distance formula?
Yes, in effect. The distance between two points is the hypotenuse of a right triangle whose legs are the horizontal and vertical differences.
Related calculators and practice
- Perimeter and area calculator for triangles and other shapes
- Square root calculator for the last step of the formula
- Slope calculator and quadratic formula calculator for more algebra
- Ratio calculator for screen sizes and scale drawings
- Geometry worksheets to practice with printable problems
- All calculators
Sources and further reading
- Pythagorean theorem (Wikipedia)
- Pythagorean triple (Wikipedia)
- Plimpton 322 (Wikipedia)
- Portable ladders: the 4-to-1 rule (CCOHS)
Last updated: October 2026.