Your result will appear here
Fill in the fields and press Calculate.
The Pythagorean theorem links the three sides of a right triangle: the square of the hypotenuse equals the sum of the squares of the other two sides. This calculator applies it either way — find the long side from the two short ones, or a missing short side from the hypotenuse — and also gives the triangle’s area and perimeter.
How is it calculated?
The theorem
For a right triangle with legs a and b and hypotenuse c:
a² + b² = c²
| To find | Rearranged |
|---|---|
| Hypotenuse c | c = √(a² + b²) |
| A leg b | b = √(c² − a²) |
Finding a leg only works when the hypotenuse is the longest side — c must be greater than the known leg, or the triangle can’t exist.
Area and perimeter
Because the legs of a right triangle meet at 90°, they are the base and height, so the area is simply ½ × a × b. The perimeter is the sum of all three sides.
Where it’s used
Anywhere a right angle appears: checking a corner is square in construction, finding a diagonal, working out distances on a grid, ramps and roof pitches. The 3–4–5 triangle is the classic whole-number example builders use to square up corners.
Worked example
A right triangle with legs of 3 and 4 has a hypotenuse of √(3² + 4²) = √25 = 5 — the famous 3–4–5 triangle. Its area is ½ × 3 × 4 = 6 and its perimeter is 3 + 4 + 5 = 12. Working backwards, if the hypotenuse is 13 and one leg is 5, the other leg is √(13² − 5²) = √144 = 12.
FAQ
What is the Pythagorean theorem?+
In any right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². It only holds for right triangles.
How do I find the hypotenuse?+
Square both legs, add them, and take the square root: c = √(a² + b²). For legs of 6 and 8, c = √(36 + 64) = √100 = 10. Choose “Hypotenuse” mode and enter the two legs.
How do I find a missing leg?+
Subtract the known leg’s square from the hypotenuse’s square, then take the root: b = √(c² − a²). The hypotenuse must be the longest side, so c has to be larger than the known leg.
What is a 3-4-5 triangle?+
A right triangle whose sides are whole numbers: 3² + 4² = 5². Builders use it to check that a corner is a true right angle — measure 3 and 4 along the two edges, and the diagonal should be exactly 5.
Does it work for any triangle?+
No — only right triangles, which have a 90° angle. For other triangles you need the law of cosines, a more general formula that reduces to the Pythagorean theorem when the angle is 90°.