Hypotenuse Calculator
Hypotenuse (c)
—
Triangle Area
—
Perimeter
—
Angle A (degrees)
—
Angle B (degrees)
—
How the Hypotenuse Calculator Works
The hypotenuse is the longest side of a right triangle, located directly opposite the 90-degree angle. It is calculated using the Pythagorean theorem, one of the most fundamental results in all of mathematics, attributed to the ancient Greek mathematician Pythagoras of Samos (c. 570-495 BC), though the relationship was known to Babylonian mathematicians at least 1,000 years earlier. The theorem states that the square of the hypotenuse equals the sum of the squares of the other two sides.
This calculator takes the two shorter sides (legs) of a right triangle as inputs and computes the hypotenuse, triangle area, perimeter, and both acute angles. It has direct applications in construction (calculating rafter lengths, ensuring square corners), navigation (finding straight-line distances), physics (vector magnitude calculation), and computer graphics (distance between two points on a screen). The diagonal calculator uses the same underlying formula to find the diagonal of rectangles and other shapes.
The Pythagorean Theorem Formula
The formula is defined in every standard geometry curriculum and has been proven in over 400 different ways throughout mathematical history.
- Hypotenuse: c = sqrt(a² + b²)
- Missing leg: a = sqrt(c² - b²)
- Area: A = (1/2) x a x b
- Perimeter: P = a + b + c
- Angles: Angle A = arctan(a/b), Angle B = arctan(b/a)
Worked example: A right triangle with legs a = 5 and b = 12: c = sqrt(25 + 144) = sqrt(169) = 13. Area = (1/2)(5)(12) = 30 square units. Perimeter = 5 + 12 + 13 = 30 units. Angle A = arctan(5/12) = 22.62 degrees. Angle B = arctan(12/5) = 67.38 degrees. Note that 22.62 + 67.38 + 90 = 180 degrees, confirming the result.
Key Terms You Should Know
- Hypotenuse: The longest side of a right triangle, opposite the right angle. From the Greek "hypoteinousa" meaning "stretching under."
- Legs (Catheti): The two shorter sides of a right triangle that form the right angle. In applied problems, these are typically the horizontal and vertical measurements.
- Pythagorean Triple: A set of three positive integers (a, b, c) where a² + b² = c². The smallest is (3, 4, 5). Every multiple of a triple is also a triple, e.g., (6, 8, 10).
- Right Triangle: A triangle containing exactly one 90-degree angle. The Pythagorean theorem applies only to right triangles. For other triangles, use the law of cosines.
- Euclidean Distance: The straight-line distance between two points in a plane, calculated as sqrt((x2-x1)² + (y2-y1)²) -- a direct application of the Pythagorean theorem to coordinate geometry.
Common Pythagorean Triples
Pythagorean triples are sets of whole numbers that satisfy the theorem exactly. They have been catalogued since ancient Babylon -- the Plimpton 322 tablet (c. 1800 BC) lists 15 triples. Carpenters use the 3-4-5 triple to verify right angles on construction sites.
| Side a | Side b | Hypotenuse c | Primitive? | Common Use |
|---|---|---|---|---|
| 3 | 4 | 5 | Yes | Construction squaring |
| 5 | 12 | 13 | Yes | Roof pitch calculations |
| 8 | 15 | 17 | Yes | Engineering |
| 7 | 24 | 25 | Yes | Surveying |
| 6 | 8 | 10 | No (2x 3-4-5) | Larger construction layouts |
| 9 | 12 | 15 | No (3x 3-4-5) | Framing and layout |
Practical Examples
Example 1 -- Construction rafter length: A builder needs a rafter for a roof with a 12-foot run (horizontal) and a 5-foot rise (vertical). Rafter length = sqrt(12² + 5²) = sqrt(144 + 25) = sqrt(169) = 13 feet. This is the well-known 5-12-13 Pythagorean triple. The builder can cut the rafter to exactly 13 feet without any decimal conversion.
Example 2 -- TV screen diagonal: A television is advertised as 55 inches, measured diagonally. If the screen has a 16:9 aspect ratio, the width is approximately 47.9 inches and the height is 27.0 inches. Verification: sqrt(47.9² + 27.0²) = sqrt(2294.4 + 729.0) = sqrt(3023.4) = 55.0 inches. The rectangle area calculator can help determine the screen area from these dimensions.
Example 3 -- Navigation distance: A hiker walks 3 miles east and then 4 miles north. The straight-line distance back to the starting point is sqrt(3² + 4²) = sqrt(9 + 16) = sqrt(25) = 5 miles. This saves the hiker 2 miles compared to retracing the L-shaped path. GPS systems use the three-dimensional version of this formula (adding elevation differences) to calculate distances.
Tips for Using the Pythagorean Theorem
- Verify right angles in construction: Measure 3 feet along one wall and 4 feet along the adjacent wall. If the diagonal between the endpoints is exactly 5 feet, the corner is a perfect 90-degree angle. Scale up to 6-8-10 or 9-12-15 for larger layouts.
- Remember special right triangles: A 45-45-90 triangle has sides in ratio 1:1:sqrt(2). A 30-60-90 triangle has sides in ratio 1:sqrt(3):2. These shortcuts save calculation time in geometry and physics problems.
- Use the theorem in 3D: For the diagonal of a box, use d = sqrt(l² + w² + h²). For example, the space diagonal of a 3x4x12 box is sqrt(9 + 16 + 144) = sqrt(169) = 13 units.
- For non-right triangles, use the law of cosines: c² = a² + b² - 2ab·cos(C). When C = 90 degrees, cos(C) = 0, and it reduces to the Pythagorean theorem. The law of cosines calculator handles this generalized case.
- Check your answer with Pythagorean triples: If your sides are close to a known triple (or a multiple), you can quickly verify whether your calculation is reasonable. For instance, sides of 15 and 20 should give a hypotenuse of 25 (5x the 3-4-5 triple).
Frequently Asked Questions
What is the Pythagorean theorem?
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: c² = a² + b². For example, with sides 3 and 4, the hypotenuse c = sqrt(9 + 16) = sqrt(25) = 5. This theorem has been proven in over 400 ways and is attributed to Pythagoras (c. 570-495 BC), though Babylonian mathematicians knew the relationship more than 1,000 years earlier. It forms the foundation for distance calculations in geometry, physics, engineering, and computer science.
What are Pythagorean triples?
Pythagorean triples are sets of three positive integers that satisfy the Pythagorean theorem exactly. The most common are (3, 4, 5), (5, 12, 13), (8, 15, 17), and (7, 24, 25). Any integer multiple of a triple is also a triple -- for instance, (6, 8, 10) is 2 times the (3, 4, 5) triple. Primitive triples (where the three numbers share no common factor) can be generated using the formula a = m² - n², b = 2mn, c = m² + n², where m > n > 0. There are infinitely many primitive triples. Carpenters routinely use the 3-4-5 rule to verify right angles on job sites.
How do I find a missing leg instead of the hypotenuse?
If you know the hypotenuse c and one leg a, the other leg is b = sqrt(c² - a²). For example, if the hypotenuse is 13 and one leg is 5, the missing leg is sqrt(169 - 25) = sqrt(144) = 12. This rearrangement is useful in construction when you know the rafter length (hypotenuse) and the run (horizontal leg) but need to find the rise (vertical leg). Always ensure c is larger than a, otherwise the triangle is impossible and you would get a negative value under the square root.
Does the Pythagorean theorem work for non-right triangles?
No, the Pythagorean theorem only applies to right triangles (those with a 90-degree angle). For non-right triangles, use the law of cosines: c² = a² + b² - 2ab·cos(C), where C is the angle between sides a and b. When C = 90 degrees, cos(C) = 0, and the formula reduces to the standard Pythagorean theorem. The law of cosines works for all triangle types -- acute, right, and obtuse. You can use the law of cosines calculator or the triangle area calculator for general triangle problems.
How is the Pythagorean theorem used in real life?
The Pythagorean theorem is used extensively in construction (calculating rafter lengths, ensuring square corners with the 3-4-5 rule, determining diagonal bracing), navigation (finding straight-line distances between two points), computer graphics (computing pixel distances for rendering and collision detection), physics (calculating resultant vectors, determining force magnitudes), and surveying (measuring inaccessible distances). GPS technology uses a three-dimensional version of the theorem to calculate distances. Even your phone's screen dimensions are specified using the theorem -- a "6.1-inch display" refers to the diagonal measurement.