By Tim King · Updated
Pythagorean Theorem Calculator
Find the Hypotenuse or a Missing Side
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Pythagorean Theorem Calculator works
This Pythagorean theorem calculator finds the hypotenuse of a right triangle from its two legs, or a missing leg from the hypotenuse and the other leg. It shows the working with the squares, then gives both acute angles, the area and the perimeter. Use any unit, as long as both lengths are in the same one.
In a right triangle, the square on the longest side equals the two smaller squares added together. That single rule lets builders check a corner is square, lets you work out a ladder's reach, a TV's diagonal or the straight-line distance across a field. The hypotenuse is always the side opposite the right angle and always the longest, which gives a quick sense check on any answer.
How the Pythagorean theorem calculator works
The formula is a² + b² = c², where c is the hypotenuse. To find c, take √(a² + b²). To find a leg, take √(c² − a²). In leg mode the calculator treats the larger of your two lengths as the hypotenuse. The angles come from the inverse sine of each leg over the hypotenuse, and the area is half the product of the legs.
First example. Legs of 3 and 4 give c = √(9 + 16) = √25 = 5, with angles of 36.87° and 53.13°.
Second example. A hypotenuse of 13 and a leg of 5 give b = √(169 − 25) = √144 = 12.
How many metres up a wall does a 5 m ladder reach? With its foot 1.5 m out, √(25 − 2.25) = √22.75 ≈ 4.77 m.
Primitive Pythagorean triples ordered by hypotenuse, with area and perimeter
| a | b | c | From m, n | Area | Perimeter |
|---|---|---|---|---|---|
| 3 | 4 | 5 | 2, 1 | 6 | 12 |
| 5 | 12 | 13 | 3, 2 | 30 | 30 |
| 8 | 15 | 17 | 4, 1 | 60 | 40 |
| 7 | 24 | 25 | 4, 3 | 84 | 56 |
| 20 | 21 | 29 | 5, 2 | 210 | 70 |
| 12 | 35 | 37 | 6, 1 | 210 | 84 |
| 9 | 40 | 41 | 5, 4 | 180 | 90 |
| 28 | 45 | 53 | 7, 2 | 630 | 126 |
| 11 | 60 | 61 | 6, 5 | 330 | 132 |
| 33 | 56 | 65 | 7, 4 | 924 | 154 |
| 16 | 63 | 65 | 8, 1 | 504 | 144 |
| 48 | 55 | 73 | 8, 3 | 1320 | 176 |
| 13 | 84 | 85 | 7, 6 | 546 | 182 |
| 36 | 77 | 85 | 9, 2 | 1386 | 198 |
| 39 | 80 | 89 | 8, 5 | 1560 | 208 |
| 65 | 72 | 97 | 9, 4 | 2340 | 234 |
| 20 | 99 | 101 | 10, 1 | 990 | 220 |
| 60 | 91 | 109 | 10, 3 | 2730 | 260 |
| 15 | 112 | 113 | 8, 7 | 840 | 240 |
| 44 | 117 | 125 | 11, 2 | 2574 | 286 |
| 88 | 105 | 137 | 11, 4 | 4620 | 330 |
| 17 | 144 | 145 | 9, 8 | 1224 | 306 |
| 51 | 140 | 149 | 10, 7 | 3570 | 340 |
| 85 | 132 | 157 | 11, 6 | 5610 | 374 |
Tips and pitfalls
- Right triangles only. For other triangles use the cosine rule.
- The hypotenuse is opposite the right angle. It is always the longest side.
- The 3-4-5 check. Mark 3 m and 4 m along two walls; if the diagonal is 5 m, the corner is square. Multiples such as 6-8-10 work too.
- Same units. Convert 90 cm and 1.2 m to 90 and 120 before calculating.
FAQ
How do you find the hypotenuse?
Square both legs, add them and take the square root. For legs of 6 and 8, 36 + 64 = 100 and √100 = 10. The hypotenuse is always longer than either leg but shorter than the two legs added together, so use that as a quick check on the result.
How do you find a missing leg of a right triangle?
Square the hypotenuse, subtract the square of the known leg and take the square root. With a hypotenuse of 10 and a leg of 6, 100 − 36 = 64 and √64 = 8. Choose Leg in the Solve for box and enter the hypotenuse and the known leg.
What is a Pythagorean triple?
A set of three whole numbers that fit a² + b² = c², such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Any multiple of a triple also works, so 6-8-10 and 9-12-15 are triples too. Builders and carpenters use them to set out square corners without a protractor.
Does the Pythagorean theorem work for all triangles?
No, only for right triangles. For any other triangle, the cosine rule c² = a² + b² − 2ab cos C replaces it; when C is 90°, the cosine is zero and it becomes Pythagoras. If a² + b² is more than c², the angle opposite c is acute; if less, it is obtuse.
How do I work out a TV or screen diagonal?
Treat the width and height as the legs and the diagonal as the hypotenuse. A screen 120 cm wide and 67.5 cm tall has a diagonal of √(14,400 + 4,556.25) ≈ 137.7 cm, or about 54 inches. The aspect ratio calculator handles 16:9 sizes directly.
See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.
Related tools
Root Calculator
Square, cube and nth roots, with the radical simplified.
Quadratic Equation Calculator
Solve ax² + bx + c = 0, with exact roots and the vertex.
Aspect Ratio Calculator
Missing width or height for a ratio, and how to crop or pad.
Scientific Calculator
Trig, logs, powers, factorials and memory, in one expression.
Circle Calculator
Radius, diameter, circumference and area from any one of them.