About the Pythagorean Theorem Calculator
One equation, known for two and a half thousand years, and still the single most used result in practical geometry:
a² + b² = c²
It says that in a right triangle, the squares built on the two short sides have exactly the same total area as the square built on the long one. Not roughly. Not usually. Exactly, and only when the angle between the short sides is a true 90°.
That last condition is the whole theorem. Tilt the corner by a degree and the equality breaks. Which is why the relationship works in reverse as a test: if you measure three lengths and find that a² + b² equals c², the corner between the two short sides must be square. Builders have used this to check right angles since long before anyone wrote the algebra down.
This calculator covers all three of the questions the theorem answers — find the long side, find a missing short side, or decide whether three lengths make a right triangle at all.
How to Use the Pythagorean Theorem Calculator
Find the hypotenuse. Enter the two legs — the sides that meet at the right angle. The result is the side opposite it.
Find a missing leg. Enter the hypotenuse and the leg you already know. The hypotenuse must be the longer of the two; if it is not, the triangle you are describing cannot exist and the calculator says so instead of inventing a number.
Check three lengths. Enter all three in any order. The calculator sorts them, tests the two shortest against the longest, and tells you whether the triangle is right, acute or obtuse.
Every mode also returns the angles, the area and the perimeter.
The Formula and Its Rearrangements
Finding the long side:
c = √(a² + b²)
Finding a short side:
a = √(c² - b²)
Testing a triangle:
a² + b² = c² -> right angle
a² + b² > c² -> all angles under 90° (acute)
a² + b² < c² -> one angle over 90° (obtuse)
Notice that finding a leg subtracts. This is the most common place the theorem goes wrong: people add out of habit, and get a side longer than the hypotenuse, which is impossible by definition.
The three-way test is worth dwelling on, because it does more than most people realise. The theorem is usually taught as a one-way street — right angle, therefore the equation. But it runs both ways, and the direction of the inequality tells you which way the largest angle is leaning. A triangle whose short sides square to more than the long one has no angle reaching 90°; one where they square to less has an angle past it.
Which side is the hypotenuse?
The one opposite the right angle, and it is always the longest of the three. There is no exception, and the reason is structural: the largest angle always sits opposite the largest side, and in a right triangle the 90° angle is the largest, because the other two must share the remaining 90° between them.
So a "right triangle" with sides 3, 5 and 4 in which 4 is the hypotenuse does not exist. Nor does one with legs 6 and 8 and a hypotenuse of 9 — that triangle is perfectly real, but it is not right-angled.
Pythagorean Triples
Most right triangles have an irrational side. A few have three whole numbers, and those combinations have been prized for as long as people have needed square corners without a protractor.
| Triple | Check | |--------|-------| | 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 | | 9, 40, 41 | 81 + 1600 = 1681 |
Multiply any triple through by a whole number and you get another: 3-4-5 scales to 6-8-10, 9-12-15, 300-400-500. A triple that is not a multiple of a smaller one is called primitive, and this calculator tells you which kind you have entered.
The practical use is the 3-4-5 method for squaring a corner. Measure 3 units along one edge, 4 along the other, and check the diagonal between those two marks. If it is exactly 5, the corner is square; if it is 5.1, the corner is slightly open. Any scale works, so 300, 400 and 500 millimetres is the same check at a size that suits a doorway, and 3, 4 and 5 metres suits a foundation.
Carpenters, bricklayers and tile setters use this constantly, and it is more reliable than a framing square on anything larger than a hand's width — because the error in a square gets multiplied along the run, whereas this test measures the actual thing you care about.
Step-by-Step Example
Finding the hypotenuse. Legs of 6 and 8.
6² = 36
8² = 64
c² = 36 + 64 = 100
c = √100 = 10
Whole number, because 6-8-10 is the 3-4-5 triple doubled.
Finding a leg. A 13-metre ladder reaches 12 metres up a wall. How far out is its foot?
a² = c² - b²
a² = 169 - 144 = 25
a = √25 = 5
Five metres. Note the subtraction, and note that the answer is smaller than the ladder — it has to be.
Checking three lengths. Are 8, 15 and 17 a right triangle?
Longest side is 17, so it is the only candidate for c.
8² + 15² = 64 + 225 = 289
17² = 289
Equal -> yes, right-angled.
And a near miss: 8, 15 and 18.
64 + 225 = 289
18² = 324
289 < 324 -> the largest angle is more than 90°, so the triangle is obtuse.
Three units of difference in one side changes the answer completely, which is why eyeballing a corner is not good enough.
Understanding Your Result
The result is the side you asked for, or a plain yes or no with the triangle's type.
The exact value matters when the answer is irrational, which it usually is. The diagonal of a square metre is √2 metres — a number no decimal can finish writing. Given as 1.414 it is already approximate, so the exact root is shown too, simplified as far as it will go. Use the root if the figure feeds into more calculation; use the decimal if you are about to cut something.
The angles are given for all three corners. In a right triangle the two acute angles always add to 90°, so a 3-4-5 triangle's corners are 90°, 36.87° and 53.13°.
The area and perimeter come free once all three sides are known. For a right triangle the area is simply half the product of the legs, because the legs are the base and height. For any other triangle that shortcut does not apply, and the calculator withholds it rather than printing a wrong number.
When Should You Use This Calculator?
Squaring a building corner, a deck or a garden bed. The 3-4-5 check, at whatever scale suits the job.
Roof rafters. The rafter is the hypotenuse of the rise and the run. Knowing two of the three gives the third.
Bracing and diagonals. A diagonal brace across a rectangular frame is the hypotenuse of its two sides — this gives the length to cut.
Ladder safety. Height reached, distance from the wall, and ladder length are a right triangle; two of them fix the third.
Screen and monitor sizes. A screen is sold by its diagonal, which is the hypotenuse of its width and height.
Navigation and surveying. Two perpendicular offsets combine into one direct distance.
Checking a measurement is possible. If someone gives you three lengths, the theorem tells you at once whether the shape they describe can be right-angled.
Common Mistakes
Adding when you should subtract. Finding a leg means c² − b². Adding gives a number bigger than the hypotenuse, which is a contradiction, not an answer.
Putting the wrong side in the hypotenuse position. It is the longest side and it is opposite the right angle. If your "hypotenuse" is shorter than a leg, the input is wrong.
Forgetting to take the root. Stopping at c² = 100 leaves you with 100, not 10.
Squaring the sum instead of summing the squares. (a + b)² is not a² + b². For 3 and 4 the first gives 49 and the second gives 25 — a hypotenuse of 7 instead of 5.
Applying the theorem to a triangle that is not right-angled. Without a 90° angle the equation does not hold, and no amount of rearranging makes it. Use the law of cosines instead.
Mixing units. Feet with inches, or metres with centimetres, gives a confidently wrong answer. Convert everything first.
Assuming a whole-number answer means you are right. 6-8-10 is a triple, but so is 6-8-10 entered by accident when you meant 6-8-9. The calculator's substitution check is there to confirm the arithmetic, not the measurement.