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.

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

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
345YesConstruction squaring
51213YesRoof pitch calculations
81517YesEngineering
72425YesSurveying
6810No (2x 3-4-5)Larger construction layouts
91215No (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

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.

Related Calculators