Pythagorean theorem calculator
Find the hypotenuse of a right triangle from the lengths of its two perpendicular sides.
Result for the values shown.
Calculations run in your browser.
What to enter
| Input | Meaning and units |
|---|---|
| Side a | Enter side a using the definition in the method and example. |
| Side b | Enter side b using the definition in the method and example. |
Understanding your result
Read Hypotenuse (units) in the units and model stated on this page. The formula c = √(a² + b²) defines the relationship; measurement accuracy and model applicability are separate from numerical precision.
Common mistakes
- Using a different mathematical definition or operation than the one stated by this tool.
Check your calculation
- Use the worked example as a known reference case, then change one input at a time and check the direction and units of the response.
Calculation checks, sources and review limits
How long is the diagonal or hypotenuse of a right triangle?
Enter the lengths of the two perpendicular sides. The result is the straight-line distance joining their other ends, in the same unit.
Common uses
- Calculate a rectangle’s corner-to-corner distance.
- Find a right triangle’s longest side.
How it works
For a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. Both inputs must use the same unit. The result is the diagonal length in that unit.
Worked example
For legs of 3 and 4, the hypotenuse is √(9 + 16) = 5.