Pythagorean Theorem Calculator
Use this tool for stairs, roof pitch layouts, room diagonals, and quick right-triangle checks in school or on site.
Calculate
Calculate
Measurements convert when you switch units
Result
The formula
For a right triangle, a and b are the legs and c is the hypotenuse. Use c = √(a² + b²) to find the hypotenuse, or rearrange to a = √(c² − b²) and b = √(c² − a²) to find a missing leg.
Worked example
- Find c when a = 3 and b = 4.
- Compute c = √(3² + 4²) = √(9 + 16) = √25.
- Result: c = 5.
Result: c = 5
Interesting facts
Classic 3-4-5 triangle
The 3-4-5 triangle is the most familiar Pythagorean triple and a practical way to mark a right angle on site.
Distance from coordinates
In coordinate geometry, the theorem gives distance with √((x2 − x1)² + (y2 − y1)²).
Applies only to right triangles
The relation a² + b² = c² is valid only when one angle is exactly 90°.
Frequently asked questions
Yes. Choose the mode to solve for side a or side b, then enter the hypotenuse and the known leg.
The hypotenuse must be longer than either leg, so c must be greater than the known leg value.
Use any unit you want, but keep all three sides in the same unit for a correct result.
It is commonly used for ramps, roof layout, room diagonals, and distance checks in construction and design.
No. For non-right triangles, use other formulas such as the law of cosines.