Hypotenuse Length Calculator
Enter the two legs of a right triangle to get the hypotenuse length, plus the angle theta as a bonus.
The hypotenuse is the longest side of a right triangle, sitting opposite the right angle. If you know the two shorter sides, you can find it in seconds with one of the oldest formulas in mathematics. This calculator does exactly that, and as a bonus it also tells you the angle between side a and the hypotenuse, in degrees.
What This Calculator Does
Give this tool the two legs of a right triangle, called side a and side b, and it returns the hypotenuse c using the Pythagorean theorem. It also computes theta, the acute angle opposite side b, which is the angle between side a and the hypotenuse. Everything is shown with the full working, so you can see each step: the squares, the sum, the square root, and the angle. It works with any positive numbers and any units, as long as both sides use the same units. If you mix centimeters and meters, the answer will be wrong, so convert first.
How to Use the Calculator
Enter Side a, the length of one leg of the right triangle, for example 3. Enter Side b, the length of the other leg, for example 4. Both must be positive numbers greater than zero, and both must be in the same units. Press Calculate to see the hypotenuse and the angle instantly, or press Reset to clear the form and start over. If either entry is missing, zero, or negative, the calculator will tell you exactly what to fix.
The Pythagorean Theorem, Explained
The theorem says: a² + b² = c². In words, if you square each of the two short sides and add the squares together, you get the square of the hypotenuse. Take the square root, and you have the hypotenuse itself: c = √(a² + b²). The reason it works is geometric. Imagine a square built on each side of the triangle. The area of the square on the hypotenuse exactly equals the combined areas of the squares on the two legs. This has been known for over two thousand years, and it has been proved in hundreds of different ways, but for everyday use you only need the formula. One important note: it only works for right triangles, triangles with one 90-degree corner. For any other triangle you need the law of cosines instead.
The Bonus Angle, Explained
Along with the hypotenuse, the calculator gives you theta, the angle opposite side b. It comes from the inverse tangent: θ = atan(b / a). In plain words, if you stand at the corner where side a meets the hypotenuse and look across the triangle, the steepness you see is the ratio b / a, and atan converts that steepness into degrees. A small ratio means a shallow angle, a large ratio means a steep one, and a ratio of 1 means exactly 45 degrees. The result is always an acute angle, between 0 and 90 degrees, because it is one of the two non-right corners of the triangle.
Worked Example 1: The Classic 3-4-5 Triangle
The most famous right triangle has sides 3 and 4. Step one: square each side, so 3² = 9 and 4² = 16. Step two: add them, 9 + 16 = 25. Step three: take the square root, √25 = 5. The hypotenuse is exactly 5.00. For the angle: θ = atan(4 / 3) = atan(1.3333) = 53.13 degrees. Type 3 and 4 into the calculator and you get c = 5.00 and θ = 53.13°, matching this working exactly.
Worked Example 2: The 5-12-13 Triangle
Another classic: sides 5 and 12. Step one: 5² = 25 and 12² = 144. Step two: 25 + 144 = 169. Step three: √169 = 13. The hypotenuse is exactly 13.00. For the angle: θ = atan(12 / 5) = atan(2.4) = 67.38 degrees. Triangles like 3-4-5 and 5-12-13 are called Pythagorean triples because all three sides come out as whole numbers, and builders have used them for centuries to check square corners.
Worked Example 3: Decimal Sides
Real measurements are rarely whole numbers. Take a = 2.5 and b = 6. Step one: 2.5² = 6.25 and 6² = 36. Step two: 6.25 + 36 = 42.25. Step three: √42.25 = 6.5. The hypotenuse is 6.50. For the angle: θ = atan(6 / 2.5) = atan(2.4) = 67.38 degrees. Notice the angle matches the previous example because the ratio 6 / 2.5 equals 12 / 5; the angle only cares about the ratio of the sides, not their size.
Worked Example 4: A Ladder Against a Wall
Here is a practical one. A ladder's foot sits 1.8 meters from a wall, and it reaches 4.2 meters up the wall. The ground and the wall form a right angle, so the ladder is the hypotenuse. Step one: 1.8² = 3.24 and 4.2² = 17.64. Step two: 3.24 + 17.64 = 20.88. Step three: √20.88 = 4.57. The ladder is 4.57 meters long. The angle at the ground is θ = atan(4.2 / 1.8) = atan(2.3333) = 66.80 degrees, a safely steep climbing angle. The calculator gives c = 4.57 and θ = 66.80° for inputs 1.8 and 4.2.
How to Read Your Results
The headline number c is the hypotenuse length in whatever units you used for the sides. Enter meters, get meters; enter inches, get inches. It is always the longest of the three sides, so if your result is shorter than one of your inputs, something went wrong. The angle theta is measured in degrees, and it is the corner between side a and the hypotenuse, opposite side b. If you swap your two inputs, the hypotenuse stays the same but the angle changes, because theta always sits across from side b. The working lines show every intermediate value, so you can copy them into homework, a report, or a site notebook with confidence.
Real-World Uses
Builders use the 3-4-5 rule to check that foundations and walls meet at true right angles: measure 3 units along one wall, 4 along the other, and the diagonal must be 5. Ramp and stair designers use the theorem to find the slope length from the horizontal run and the vertical rise. Screen sizes are hypotenuses: a TV advertised as 55 inches is 55 inches on the diagonal of a rectangle, which is two right triangles back to back. Navigators and surveyors use it to find straight-line distances from north-south and east-west offsets. Anytime you know two perpendicular distances and need the direct distance, this is the formula.
Common Mistakes to Avoid
The number one mistake is using the formula on a triangle that is not a right triangle. If there is no 90-degree corner, the answer is wrong; use the law of cosines instead. Second, people mix units, entering one side in centimeters and the other in meters, which silently corrupts the result. Third, some forget to square the sides and just add a + b, which always undershoots. Fourth, others square but forget the final square root, which overshoots wildly. Fifth, angle confusion: theta here is in degrees and sits opposite side b, so if you need the other acute angle, subtract from 90. Finally, remember the hypotenuse must be the longest side; if it is not, recheck your inputs.
Frequently Asked Questions
1. What is a hypotenuse?
It is the longest side of a right triangle, sitting opposite the 90-degree corner. The other two sides are called the legs.
2. What is the hypotenuse formula?
c = √(a² + b²), where a and b are the two legs. Square each leg, add them, and take the square root.
3. Does it work for any triangle?
No, only right triangles. For triangles without a right angle you need the law of cosines instead.
4. What is the angle theta in the result?
It is the acute angle opposite side b, between side a and the hypotenuse, given in degrees. It comes from θ = atan(b / a).
5. What are the 3-4-5 and 5-12-13 triangles?
They are Pythagorean triples: right triangles where all three sides are whole numbers. Builders use 3-4-5 to check square corners on site.
6. What units does the answer use?
Whatever units you entered. If both sides are in meters, the hypotenuse is in meters. Keep both inputs in the same units.
7. Can the hypotenuse be shorter than a leg?
Never. The hypotenuse is always the longest side. If your result is shorter than an input, one of the inputs is wrong.
8. How do I find the other acute angle?
Subtract theta from 90 degrees. The two acute angles of a right triangle always add up to 90.
9. What if I know the hypotenuse and one leg?
Rearrange the formula: the unknown leg = √(c² - a²). This calculator solves for the hypotenuse only, so do that step by hand or with a square-root tool.
10. Why do I square the sides first?
Because the theorem is about areas: the square built on the hypotenuse has the same area as the two squares on the legs combined. Squaring converts lengths into those areas.
11. Is the angle in degrees or radians?
Degrees. Most everyday uses, from construction to navigation, work in degrees, so the calculator reports theta that way.
12. What happens if I swap sides a and b?
The hypotenuse stays exactly the same, but the angle changes, because theta is always measured opposite side b.
13. Can I use decimals?
Yes. Any positive number works, including decimals like 2.5. The answer is rounded to two decimal places.
14. How is this used for TV screen sizes?
A screen's advertised size is the diagonal of the rectangle. Split the rectangle into two right triangles and the diagonal is the hypotenuse of width and height.
15. Who discovered the Pythagorean theorem?
It is named after the Greek thinker Pythagoras, but the relationship was known to Babylonian and Indian mathematicians centuries earlier. Hundreds of proofs exist today.
Final Thoughts
The Pythagorean theorem is one of those rare formulas that is both ancient and used daily, from checking a foundation's corners to sizing a TV. Enter your two sides, read off the hypotenuse and the angle, and trust the working shown underneath. As long as your triangle has a right angle and your units match, the answer is exact every time.