Pythagorean Theorem Calculator
Calculate the hypotenuse or a leg of a right triangle. The simulator updates in real time as you enter values.
The Pythagorean theorem is one of the foundations of Euclidean geometry and one of the most widely known and applied mathematical concepts. It 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 (legs): a² + b² = c². This relationship has thousands of applications in architecture, engineering, surveying and physics.
This calculator lets you calculate the hypotenuse knowing both legs, or calculate a leg when you know the hypotenuse and the other leg. The visual simulator updates in real time so you can see the right triangle with the correct proportions. Particularly useful for secondary school and vocational training problems or construction work.
Enter values to calculate.
How to apply the theorem step by step
The theorem relates the three sides of a right triangle through the formula a² + b² = c², where c is always the hypotenuse (the side opposite the right angle). To find the hypotenuse you square both legs, add them and take the square root of the total. To find a leg you do the opposite: subtract the square of the known leg from the square of the hypotenuse and take the root. The key is to correctly identify which side is the hypotenuse before you start.
Worked example
Take a right triangle with legs of 6 and 8 units. Applying the formula: c = √(6² + 8²) = √(36 + 64) = √100 = 10. The hypotenuse is 10 units. If instead we knew the hypotenuse (10) and one leg (6), the other leg would be √(10² − 6²) = √(100 − 36) = √64 = 8.
Most common Pythagorean triples
| Leg a | Leg b | Hypotenuse c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 20 | 21 | 29 |
| 9 | 40 | 41 |
How to interpret the result
The result shown by the calculator is mathematically exact, but it will often have decimals because most triangles do not form perfect Pythagorean triples. In a classroom problem you are usually asked to round to two decimal places; in construction or carpentry it is enough to round to the unit of measurement you are using (millimetres or centimetres). Remember that the three sides must share the same units: if the legs are in metres, the hypotenuse will also come out in metres.