How to use this calculator
- Enter leg a, leg b, hypotenuse c.
- Review the assumptions and units shown beside the fields.
- Read the live result, calculation note, and worked examples before using the answer.
Measuring the diagonal cut for a picture frame
You are holding a piece of wood for a picture frame. You need to cut the diagonal support brace. The frame corner forms a perfect right angle. You know the length of one side is 3 inches. The adjacent side is 4 inches. You need the length of the brace that connects the outer corners. This is the hypotenuse. You cannot just guess the measurement. A wrong cut means the frame sits crooked or breaks under stress.
The Pythagorean theorem handles this calculation instantly. It squares the two known legs and adds them together. Then it takes the square root of the sum. In your case, 3 squared is 9. 4 squared is 16. Adding those gives 25. The square root of 25 is 5. Your brace must be exactly 5 inches long. This relationship holds true for any right triangle. It does not matter if you are working with inches, centimeters, or feet. The geometry remains identical.
This specific example is the most common in carpentry. Many standard frame dimensions rely on this 3-4-5 ratio. It is easy to remember and hard to mess up. If your measurements are 1 inch and 1 inch instead, the diagonal is different. It becomes the square root of 2. That is approximately 1.414 inches. Always double-check which side is the hypotenuse. It is always the longest side. It is always opposite the right angle. Cut to that length and your frame will fit together tightly.
Why the third side is always longer than either leg
Picture a right triangle. You have two sides that meet at a perfect ninety-degree corner. These are the legs. The third side stretches across the open space, connecting the ends of those legs. This longest stretch is the hypotenuse. It always wins the length contest. Why does this happen? Think about walking. If you walk along one leg and then the other, you take a detour. You cover more ground by following the corner than by cutting straight across. The direct path is shorter. The hypotenuse is that direct path. It cuts the corner.
This idea holds true no matter how you shape the triangle. Make the legs tiny or huge. The side opposite the right angle remains the longest. It is the distance between two points when you do not force a turn. In a square with legs of 1 unit, the diagonal stretches to about 1.414 units. That is longer than either of the sides it connects. The geometry does not change. The straight line between two points is the shortest route possible. Any detour, like walking along the legs, adds distance.
So when you look at a right triangle, your eye can trust one fact. The side facing the right angle is the big one. It is the result of combining the reach of both legs into a single stretch. You do not need to measure it to know it is the longest. The shape itself guarantees it. This simple rule underpins everything you will do with the Pythagorean theorem. It sets the stage for finding that missing length. You always know which side is the champion of length before you even start calculating.
Using a² + b² = c² to find the missing piece
The formula a² + b² = c² holds the key to unlocking the missing dimension. You start by identifying what you know. If you have the two legs, square each one. That means multiplying the value by itself. Then, add those two results together. The sum represents the square of the hypotenuse. To find the actual length, you simply take the square root of that total. It is a straightforward arithmetic sequence that removes the guesswork from geometry.
Consider the classic example where the legs measure 3 and 4. You square 3 to get 9. You square 4 to get 16. Adding them gives you 25. The square root of 25 is 5. That is your missing hypotenuse. Notice how the numbers align perfectly without any messy decimals. This specific trio of 3, 4, and 5 is a favorite because it keeps the math clean and easy to verify by hand.
When the unknown is a leg, the process flips slightly. Suppose the hypotenuse is 13 and one leg is 5. Square the hypotenuse to get 169. Square the known leg to get 25. Subtract the smaller number from the larger one. You are left with 144. The square root of 144 is 12. That is the length of the other leg. The subtraction step is the critical difference when solving for a side rather than the diagonal.
Rounding the result without losing useful precision
Many valid results are not whole numbers. With legs of 1 and 1, the exact hypotenuse is √2, whose decimal begins 1.4142135. The calculator returns a numeric approximation because JavaScript numbers cannot store an infinite irrational expansion. Keep extra digits during intermediate work and round only the final measurement.
The appropriate rounding depends on the inputs and use. Reporting 1.4142135 meters implies more measurement precision than inputs recorded only to the nearest meter can support. For a classroom exercise, an exact radical or a requested number of decimal places may be appropriate; for a physical cut, match the tool and tolerance being used. The theorem supplies a mathematical length, not the accuracy of the original measurements.
Units also need attention. If both legs are entered in centimeters, the result is in centimeters. If one is in meters and the other in centimeters, convert them to a common unit before calculating. Squaring mixed units does not create a meaningful triangle, even though the calculator can still return a number.
Forgetting to square the numbers before adding
You know the formula looks simple. a² + b² = c². But it is easy to skip the squaring step. You see two numbers, say 3 and 4, and your brain wants to add them right away. That gives you 7. Then you take the square root of 7 and end up with a messy decimal around 2.65. That is wrong. The actual hypotenuse is 5. The difference matters. If you are cutting a board, a few inches is a lot.
The mistake is adding the raw lengths instead of their squares. You must multiply each leg by itself first. Three squared is 9. Four squared is 16. Only then do you add them. 9 plus 16 equals 25. Now you take the square root of 25. You get 5. Clean and correct. If you skip the squaring, you are solving a completely different problem. The geometry does not care about your shortcut. It demands the squares.
Think about the example with a hypotenuse of 13 and a leg of 5. To find the other leg, you need 12. If you just subtract 5 from 13, you get 8. That is wrong. You have to square the 13 to get 169. Square the 5 to get 25. Subtract them to get 144. Take the square root to get 12. The order of operations is not optional. It is the whole point. Skip the squares and your answer is garbage.
Confusing the hypotenuse with a leg
Mixing up the hypotenuse with a leg is a common stumbling block. The hypotenuse is always the side opposite the right angle. It is the longest side of the triangle. The two legs meet at that ninety-degree corner. If you swap them in your calculation, the math breaks. You might enter a value for the unknown hypotenuse when you actually need a leg. The calculator will give you a number, but it will be the wrong one. This error is silent. It does not throw a warning. You just get a result that looks plausible but is geometrically impossible for your specific triangle.
Visualize a right triangle. The corner where the two shorter sides touch is the right angle. The side lying opposite that corner, joining the other two vertices, is the hypotenuse. It never touches the right angle. The legs do. When you fill in the inputs, check which sides touch the corner. Those are your a and b values. The one floating away from the corner is your c value. If you are unsure, remember that the hypotenuse must be longer than either leg. If your calculated hypotenuse is shorter than one of your legs, you have likely confused the roles.
Take the example of legs 3 and 4. The hypotenuse is 5. If you mistakenly treat 5 as a leg and try to find the other leg using 3 as the other leg, you are solving a different problem entirely. You are no longer working with the original triangle. The inputs define the shape. Label your sides before you type them in. Identify the right angle first. Then identify the side opposite it. Only then should you assign values to the fields. This simple check prevents the most frustrating type of input error.
Checking the result against triangle constraints
A computed hypotenuse must be longer than either positive leg and shorter than their sum. For legs 6 and 8, the result 10 passes both checks: it exceeds 8 but is less than 14. These inequalities will not prove every digit is correct, but they quickly expose a swapped field or a missing square root.
When solving for a leg, the entered hypotenuse must be greater than the known leg. The implementation rejects a case such as hypotenuse 5 and known leg 7 instead of taking the square root of a negative difference. It also requires exactly one of the three sides to be missing; otherwise the problem is either under-specified or already fully specified.
For an independent numerical check, substitute the result back into a² + b² = c². Small differences can appear after rounding, so check with the unrounded result where possible. This residual check is more general than memorizing a few integer triples and works equally well for decimal inputs.
Terms you will see in geometry class
A right angle is the corner that looks like a perfect L. It measures exactly 90 degrees. You will see this shape in doors, windows, and picture frames. If you have a protractor, you can verify it by placing the center on the vertex and lining up the zero mark with one side. The other side should hit the 90-degree mark. This specific angle is what allows the Pythagorean theorem to work. Without it, the relationship between the sides changes completely. You need this corner to use the formula a² + b² = c².
The two sides that form that right angle are called legs. They are the shorter sides of the triangle. In the classic 3-4-5 example, the numbers 3 and 4 are the legs. They meet at the corner. You can label them a and b. They do not have to be equal. One can be much longer than the other. As long as they meet at a 90-degree angle, they are legs. They are the inputs you use when you know two sides and need to find the third.
The hypotenuse is the side opposite the right angle. It is always the longest side. In your 3-4-5 triangle, the 5 is the hypotenuse. In the 5-12-13 example, the 13 is the hypotenuse. It stretches across the triangle, connecting the ends of the two legs. You never put the hypotenuse into the leg position in the formula. It sits alone on the other side of the equation. Knowing which side is which prevents most errors when you start calculating.
Reference and example table
| Case | Meaning |
|---|---|
| Example 1 | Legs 3 and 4 give hypotenuse 5. |
| Example 2 | Hypotenuse 13 and one leg 5 give the other leg 12. |
| Example 3 | Legs 1 and 1 give hypotenuse √2, about 1.414. |
Frequently asked questions
How do I find the hypotenuse if I know the two legs?
Square both leg lengths and add the results together. Then take the square root of that sum to get the hypotenuse. For example, legs of 3 and 4 give a hypotenuse of 5.
What if I know the hypotenuse and one leg?
Square the hypotenuse and subtract the square of the known leg. The square root of that difference is your missing leg. If you have a hypotenuse of 13 and a leg of 5, the other leg is 12.
Does this work for triangles that are not right-angled?
No, the Pythagorean theorem only applies to right triangles. It specifically relates the two legs to the side opposite the 90-degree angle. You cannot use this formula for acute or obtuse triangles.
Why do I get a decimal like 1.414 instead of a whole number?
Not all right triangles have integer side lengths. If you have legs of 1 and 1, the hypotenuse is the square root of 2, which is approximately 1.414. This is a standard irrational number result.
Which field should I leave blank in the calculator?
Leave the field for the unknown side blank. If you are looking for the hypotenuse, enter values for legs a and b but leave c empty. If you are solving for a leg, enter the hypotenuse and the other leg.
Can I use this to find the area of the triangle?
No, this tool calculates only the length of the missing side. To find the area, you would need to multiply the two legs together and divide by two. That is a separate calculation from finding side lengths.
What happens if I enter negative numbers?
Side lengths represent physical distances, so they must be positive values. Entering negative numbers is geometrically impossible for a triangle side. You should always input positive values for legs a and b and hypotenuse c.