Pythagorean Theorem Calculator
Find the hypotenuse or a missing leg of any right triangle.
Right triangle side calculator
Choose the unknown side, enter two positive lengths, and calculate the answer.
About the Pythagorean theorem
The Pythagorean theorem describes the relationship among the three sides of a right triangle. If a and b are the legs that meet at the right angle and c is the hypotenuse opposite that angle, then a squared plus b squared equals c squared. This calculator rearranges that relationship to solve for whichever side is unknown. To find the hypotenuse, it adds the squares of both legs and takes the positive square root. To find a leg, it subtracts the square of the known leg from the square of the hypotenuse before taking the positive square root.
The theorem applies only to right triangles. A right triangle contains one angle of exactly 90 degrees, and its hypotenuse is always its longest side. That longest-side rule is why a hypotenuse entered while solving for a leg must exceed the known leg. Lengths may use any unit, including centimeters, meters, inches, or feet, as long as both known values use the same unit. The calculated side then uses that same unit. Squared values are intermediate calculations; the final square root returns the answer to an ordinary length.
This relationship is useful in geometry, construction, surveying, navigation, computer graphics, and everyday measurement. It can find a diagonal across a rectangular room, the length of a ladder needed to reach a height, or the direct distance represented by horizontal and vertical movement. Decimal inputs are supported, so the calculator also works with measured values rather than only textbook integers. Results are rounded to a practical number of decimal places while preserving enough precision for most learning and planning tasks.
A result can be checked by squaring all three side lengths and confirming that the two leg squares add to the hypotenuse square. Some right triangles have whole-number sides, such as 3, 4, and 5, while many produce irrational square roots. An irrational result is expected and does not mean the triangle is invalid. For physical projects, retain extra decimal places during calculation and round only at the end according to the precision of the original measurements.
Pythagorean theorem examples
| Known sides | Missing side | Explanation |
|---|---|---|
| a = 3, b = 4 | c = 5 | Classic 3-4-5 right triangle |
| a = 5, c = 13 | b = 12 | Subtract 25 from 169, then take the square root |
| a = 8, b = 15 | c = 17 | A common integer right triangle |
How to calculate a missing side
- Choose whether the unknown side is the hypotenuse or one of the legs.
- Enter the first known leg as a positive number.
- Enter the other leg or the hypotenuse using the same unit.
- Select Calculate missing side and review the result and formula.
Frequently asked questions
What is the Pythagorean theorem formula?
The formula is a squared plus b squared equals c squared, where c is the hypotenuse. It applies to every right triangle.
How do I find the hypotenuse?
Square both legs, add those values, and take the positive square root. The hypotenuse will be longer than either leg.
How do I find a missing leg?
Square the hypotenuse and subtract the square of the known leg. Take the positive square root of that difference.
Can I use decimal side lengths?
Yes, positive decimal measurements are supported. Keep both inputs in the same unit so the result has a meaningful unit.
Does the theorem work for every triangle?
No, it directly applies only to triangles with a 90-degree angle. Other triangles require the law of cosines or a different relationship.