The Calc Guide › Calculator
Pythagorean Theorem Calculator
The Pythagorean theorem calculator finds any side of a right triangle with the working shown: legs 3 and 4 give a hypotenuse of 5 (3-4-5), legs 5 and 12 give 13, and a leg solves by subtraction, hypotenuse 10 with leg 6 giving leg 8. Impossible triangles are refused in plain words. Checked November 2026.
Last updated: November 24, 2026
Find any side of a right triangle, with the working shown
Enter the two sides you know; the box for the side you are finding is ignored. The legs a and b meet at the right angle; the hypotenuse c sits opposite it and is always the longest side. Use the same unit for all three.
How this is worked out
c² = a² + b² = 9 + 16 = 25, so c = √25 = 5.
Finding a leg turns the sum into a subtraction: the leg's square is the hypotenuse square minus the other leg's square.
Next: the area of the whole shape with the Area Calculator
Free. No sign-up. Calculated in your browser; nothing is sent to our servers.
What this calculator does
This Pythagorean theorem calculator finds the missing side of a right triangle from the two sides you know, whichever side is missing: the hypotenuse or either leg. It prints the full working for the state you entered, the two squares, their sum or difference, and the root, rather than dropping a bare answer, and it completes the picture with the triangle’s area and perimeter. It also refuses the one input that looks reasonable and is not: a hypotenuse that is not longer than a leg. Such a triangle cannot exist, so the tool says so in plain words instead of giving a number. All three sides take the same unit, whatever it is, and the answer comes back in that unit; square roots are shown at the site’s standard six significant figures. The distance around a circle, rather than the length of a diagonal, is the circumference calculator.
Worked examples: 3-4-5, 5-12-13, and finding a leg
The tool opens on the 3-4-5 triangle, a well-known right triangle:
Scroll sideways to see all columns →
| Find | Working | Result |
|---|---|---|
| Hypotenuse, legs 3 and 4 | c² = 9 + 16 = 25, so c = √25 | 5 (area 6, perimeter 12) |
| Hypotenuse, legs 5 and 12 | c² = 25 + 144 = 169, so c = √169 | 13 (area 30, perimeter 30) |
| Leg b, hypotenuse 10 and leg a 6 | b² = 100 − 36 = 64, so b = √64 | 8 (area 24, perimeter 24) |
| Hypotenuse, legs 7 and 9 | c² = 49 + 81 = 130, so c = √130 | 11.4018 |
The third row is the rearrangement students trip on: finding a leg subtracts, because the leg’s square is what is left of the hypotenuse square after the other leg’s square is taken away. The last row shows the display convention: √130 is 11.401754…, printed as 11.4018 at six significant figures. Rounded to four significant figures the same value is 11.40; the difference is rounding depth, not a different answer.
Reference: Pythagorean triples worth recognizing
Scroll sideways to see all columns →
| Leg a | Leg b | Hypotenuse c | Check |
|---|---|---|---|
| 3 | 4 | 5 | 9 + 16 = 25 |
| 6 | 8 | 10 | 36 + 64 = 100 |
| 5 | 12 | 13 | 25 + 144 = 169 |
| 9 | 12 | 15 | 81 + 144 = 225 |
| 8 | 15 | 17 | 64 + 225 = 289 |
| 7 | 24 | 25 | 49 + 576 = 625 |
| 20 | 21 | 29 | 400 + 441 = 841 |
A Pythagorean triple is a set of three whole numbers that fits the theorem exactly, with no root to round. Two of the rows are the 3-4-5 triangle scaled (6-8-10 by two, 9-12-15 by three), and any whole-number multiple of a triple is again a triple. Construction training standards name the 3-4-5 rule for checking that a foundation is square (see Sources and method). Recognizing the common triples lets you check the tool’s answers, and your own working, at a glance.
The theorem, and the two directions it runs
a² + b² = c²; finding the hypotenuse: c = √(a² + b²); finding a leg: b = √(c² − a²)
The statement: in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. The hypotenuse is the side opposite the right angle and is always the longest side; the legs are the two sides that form the right angle.
Finding the hypotenuse adds: square both legs, add the squares, take the root. The root of the sum is shorter than the sum of the legs themselves, which is the shortcut a diagonal always offers.
Finding a leg subtracts: square the hypotenuse, subtract the known leg’s square, take the root. The subtraction is exactly why the hypotenuse must be the longest side: if the known leg equaled or beat it, the subtraction would leave zero or a negative number, and no square is negative.
Right triangles only: the equality holds if and only if the angle between a and b is exactly 90 degrees. For any other angle the same three sides follow a different rule, and this tool’s answer would be wrong, which is why the theorem is also a test for whether an angle is right.
Sources and method
The theorem is mathematics, not measurement. Euclid states it as Proposition 47 of Book I of the Elements and gives its converse as Proposition 48 (Euclid, Elements, Book I, Proposition 47 and Proposition 48, David Joyce’s edition, Clark University). Britannica says the theorem came to be credited to Pythagoras (about 570 to 500 or 490 BCE) and his school, and that it was known earlier: four Babylonian tablets from about 1900 to 1600 BCE show some knowledge of it, and the Baudhayana Sulba-sutra of India, written between 800 and 400 BCE, mentions it. The 3-4-5 rule for squaring a foundation appears in the Alabama Career and Technical Education standards for Architecture and Construction (CTE22.AC.CONF.3a).
The tool computes in your browser with standard double precision arithmetic, about 15 to 16 significant digits, and rounds only at display, to six significant figures. Limits: sides between about 10^-150 and 10^150 work as shown; beyond that range a square overflows or underflows. When a leg is within about one part in 100 million of the hypotenuse, the sixth digit of the other leg can be off. The area on the result panel is the completed triangle’s own (half the product of the legs) and the perimeter is the sum of the three sides. Sources checked November 19, 2026.
Related calculators
The Area Calculator finds the areas of eight flat shapes, triangles among them, in metric and imperial units. The Slope Calculator works the coordinate side of the same geometry, gradients and line equations, and the Volume Calculator takes the step into three dimensions.
Frequently asked questions
What does the Pythagorean theorem say?
That in a right triangle, the square of the longest side (the hypotenuse, c) equals the sum of the squares of the other two sides (the legs, a and b): a² + b² = c². With legs of 3 and 4 the squares are 9 and 16, the sum is 25, and the hypotenuse is its root, 5. The statement connects lengths, not angles directly, and it holds exactly when the angle between the legs is 90 degrees.
How do I find a missing leg?
Rearrange the theorem so the leg is alone: b = √(c² − a²). Square the hypotenuse, subtract the square of the leg you know, and take the root. For a hypotenuse of 10 and a leg of 6: 100 − 36 = 64, and √64 = 8. The subtraction is the step to remember: finding a leg always subtracts, because the leg’s square is part of the hypotenuse’s square, not added to it.
What is the hypotenuse?
The side of a right triangle opposite the right angle, and always the longest of the three sides. It is the diagonal shortcut across the corner the legs form: a ladder against a wall is a hypotenuse, with the wall’s height and the base’s distance from the wall as its legs. A 4 meter wall and a base 3 meters out need a 5 meter ladder, the 3-4-5 triangle.
Does the theorem work for triangles without a right angle?
No. For a triangle whose largest angle is not exactly 90 degrees, a² + b² does not equal c²: it comes out larger when the angle is acute and smaller when the angle is obtuse. That failure is itself useful, because the comparison tests an angle: if the squares of the two shorter sides add to the square of the longest, the angle between them is right, and if they do not, it is not.
How do builders use 3-4-5 to check a corner?
They mark 3 units along one edge from the corner and 4 units along the other, then measure the diagonal between the marks. If it reads exactly 5 units, the corner is a true right angle, because 3-4-5 satisfies the theorem exactly. A diagonal longer than 5 means the angle is wider than 90 degrees, and a shorter one means it is narrower. Any multiple works the same way, 6-8-10 or 9-12-15, which helps on larger layouts.
Change log
November 19, 2026: Two unsourced remarks (a superlative about the 3-4-5 triangle and a remark about what some books print) replaced with checkable wording; Babylonian and Indian history reworded to match Britannica; builders and 3-4-5 claim sourced; limits and precision stated; refusal wording changed to “not longer than a leg”; FAQ answer on the 3-4-5 check now says what a longer or shorter diagonal means; Sources and method sources linked and dated; this change log added.
Educational tool only. Results are estimates based on the numbers you enter and the assumptions explained on this page, not financial advice.