The Pythagorean Theorem, Worked Through Properly
Square the two short sides, add them, take the root. Here is the theorem applied to ladders, shed bases, and TV screens.
Quick answer: In a right triangle, the square of the longest side equals the sum of the squares of the other two: a2 + b2 = c2. With short sides of 3 and 4, c2 = 9 + 16 = 25, so the hypotenuse is 5. It also solves backwards for a missing short side, which is what most real problems need.
The theorem is about 2,500 years old and still the fastest way to get a length you cannot measure directly. Measure the two sides that meet at a right angle and you know the third.
What the equation is doing
Square the two sides that meet at the right angle, add them, and take the square root. That is the whole method. The 3-4-5 triangle is the famous case because every number comes out whole. So does 5-12-13: 25 + 144 = 169, and the square root of 169 is 13. Sets like these are called Pythagorean triples; 8-15-17 and 7-24-25 are two more.
It only works when there is a right angle
This is the mistake worth guarding against. The relationship holds for right triangles and nothing else. On a triangle whose largest corner is 80 degrees, squaring and adding gives a wrong answer. For those you need the law of cosines, the general version with a correction term bolted on.
Run your own numbers
It is free, there is no sign-up, and it works on your phone.
Open the Pythagorean Theorem CalculatorSolving for a leg, not the hypotenuse
Real problems usually hand you the long side and one short one. Rearranged, a2 = c2 - b2.
Take a 20 ft ladder with its base 6 ft out from the wall. The height it reaches is the square root of (400 - 36), which is the square root of 364, or 19.08 ft. Move the base out to 8 ft and the reach drops to 18.33 ft. Two extra feet of base costs nine inches of height, which is why ladder guidance talks about a 4-to-1 ratio.
Try it with your figures
No sign-up, no ads. Your inputs stay in your browser.
Use the Pythagorean Theorem CalculatorWhere this gets used outside a maths class
Squaring a corner before you build on it
Setting out a shed base 2.4 m by 1.8 m: the diagonal should measure the square root of (5.76 + 3.24), which is the square root of 9, exactly 3.0 m. Pull a tape corner to corner. If it reads 3.05 m, the frame is a parallelogram, not a rectangle. Builders use the same idea as the 3-4-5 method: mark 3 units along one string and 4 along the other, and the corner is square when the gap reads 5.
Screen and TV sizes
A television is sold by its diagonal, which is the hypotenuse. A 55 inch 16:9 screen is 47.9 inches wide and 27.0 inches tall, because 47.9 squared plus 27.0 squared comes to about 3,024, and the square root of that is 55. This is why a 55 inch set does not fit an alcove 50 inches wide once you allow for the bezel and the stand.
How to use the Pythagorean theorem calculator
Fill in the two sides you know and leave the unknown one empty. The calculator works out which side is missing and applies the right form, so you never rearrange anything yourself. Enter all three and it tells you whether the triangle is actually right angled.
Keep your units consistent
Feet with feet, metres with metres. Mixing 6 ft with 200 cm gives a confident and completely wrong answer, and it is the most common error here. Convert before you type. Decimal feet also beat feet-and-inches: 6 ft 6 in is 6.5, not 6.6. Rounding to two decimal places is fine for anything you will cut with a saw. Our note on the square root calculator covers exact versus decimal forms, and there is a wider list in our guide to free online maths calculators.
Check your own case
Free to use, and it takes less than a minute.
Open the Pythagorean Theorem CalculatorCommon questions
Can I use it on a triangle that is not right angled? No. Use the law of cosines instead. It adds a term for the angle between the two known sides, and collapses back into Pythagoras when that angle is 90 degrees.
How do I check whether a corner is square? Measure both sides out from the corner, calculate what the diagonal should be, then measure it. If they match, the corner is 90 degrees. If the real diagonal is longer, the corner is open wider than 90.
Why does my answer have endless decimals? Because most square roots are irrational. The square root of 2 is 1.41421356 and carries on forever. Nothing has gone wrong. Round to whatever precision the job needs.
Does it work in three dimensions? Yes, with an extra term. The diagonal of a box is the square root of (length squared + width squared + height squared). A 40 by 30 by 20 cm box has a 53.9 cm internal diagonal, which tells you whether a long item will fit.
Calculators for this
All free, no sign-up.