Education

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.

What do you want to calculate?

Enter values to calculate.

Simulator
↺ reset90°a = ?b = ?c = ?

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 aLeg bHypotenuse c
345
51213
81517
72425
202129
94041

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.

Frequently asked questions

The Pythagorean theorem states that in every right triangle, the sum of the squares of the two legs equals the square of the hypotenuse: a² + b² = c². It was proved by the Greek mathematician Pythagoras in the 6th century BC.

The hypotenuse (c) is the longest side of a right triangle and is opposite the right angle. The legs (a and b) are the two sides that form the right angle.

The 3-4-5 triple is the most famous: 3² + 4² = 9 + 16 = 25 = 5². Other well-known triples are 5-12-13, 8-15-17 and 7-24-25.

When you know the hypotenuse and one of the legs, you find the other leg by subtracting instead of adding. Starting from a² + b² = c², you rearrange to b² = c² − a², so b = √(c² − a²). For example, if the hypotenuse is 13 and one leg is 5, the other leg is √(13² − 5²) = √(169 − 25) = √144 = 12. For the operation to make sense, the hypotenuse must always be greater than the known leg; otherwise no right triangle can exist with those values.

It is one of the most useful tools outside the classroom. In construction and carpentry the 3-4-5 relationship is used to check that a corner forms a perfect right angle without a set square. In surveying and navigation it lets you calculate straight-line distances from horizontal and vertical displacements. It also appears when working out the diagonal of a screen or a room, the length of a ramp or a ladder leaning against a wall, and it is the basis of the distance formula between two points in analytic geometry.

Other Education calculators