Pythagorean Theorem Calculator
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². It is one of the oldest theorems in mathematics — and one of the most useful, from checking that a corner is square to finding the distance between two points.
Enter any two sides of a right triangle to find the missing side, plus the area, the perimeter and all three angles.
Missing side
How It Works
The theorem is a² + b² = c², where c is the hypotenuse — the side opposite the right angle — and a and b are the legs. Which side is missing decides how the formula is rearranged: to find the hypotenuse, c = √(a² + b²); to find a leg, a = √(c² − b²) or b = √(c² − a²). The square root is always the positive one, because a length cannot be negative.
Once all three sides are known, the rest follows. The area of a right triangle is half the product of the legs: area = a × b / 2. The perimeter is the sum of all three sides: a + b + c. The angles come from inverse sine: the angle opposite side a is arcsin(a / c), the angle opposite side b is 90° minus that, and the third angle is the right angle itself, 90°.
Some right triangles have all whole-number sides — Pythagorean triples. The best known are 3-4-5, 5-12-13 and 8-15-17, and any multiple of a triple is a triple too (6-8-10, 10-24-26). Builders have used the 3-4-5 triple for thousands of years to lay out square corners: measure 3 units along one edge and 4 along the other, and the diagonal between the marks must be exactly 5.
Worked Example
The classic 3-4-5 triangle: with legs a = 3 and b = 4, the hypotenuse is c = √(3² + 4²) = √25 = 5. The area is 3 × 4 / 2 = 6 and the perimeter is 3 + 4 + 5 = 12. The angles are arcsin(3/5) ≈ 36.87° opposite side a, arcsin(4/5) ≈ 53.13° opposite side b, and 90°.
To find a leg instead, take a = 5 with hypotenuse c = 13: the missing leg is b = √(13² − 5²) = √(169 − 25) = √144 = 12 — the 5-12-13 triple. The area is 5 × 12 / 2 = 30 and the perimeter is 5 + 12 + 13 = 30.
Assumptions
- The triangle is a right triangle — one angle is exactly 90°. The theorem does not apply to other triangles.
- Side lengths must be positive numbers, and the hypotenuse must be longer than either leg.
- Angles are shown in degrees, to 4 decimal places.
- Results are shown to 4 decimal places; irrational values such as √2 are rounded for display.
Sources: No external data is used on this page — every figure is calculated from the numbers you enter. Last reviewed: 15 November 2026.
Built and tested by SumKitTool — see how we check our numbers.
How to Use This Calculator
Choose what you want to find — the hypotenuse or one of the legs — then enter the two sides you know. The labels change to match your choice, and the results update live. The headline shows the missing side; the table lists all three sides, the area, the perimeter and the three angles. Try legs 3 and 4 for the 3-4-5 triangle, or leg 5 with hypotenuse 13 for the 5-12-13 triple.
Tips and Practical Advice
- Check the hypotenuse first. If the side you called the hypotenuse is shorter than a leg, you have mixed the sides up — the hypotenuse is always the longest.
- Use the 3-4-5 check in real life. To test whether a corner is square, mark 3 units along one side and 4 along the other: the diagonal between the marks should measure exactly 5.
- Remember the common triples. 3-4-5, 5-12-13, 8-15-17 and 7-24-25 cover many textbook problems, and their multiples (6-8-10, 10-24-26) work the same way.
- Distances are Pythagoras in disguise. The distance between two points is the hypotenuse of a right triangle whose legs are the differences in x and y.
Frequently Asked Questions
What is the Pythagorean theorem?
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: a² + b² = c². It only applies to right triangles. The classic example is the 3-4-5 triangle: 3² + 4² = 9 + 16 = 25 = 5².
How do I find a missing leg instead of the hypotenuse?
Choose “Find leg a” or “Find leg b” above, then enter the known leg and the hypotenuse. The calculator rearranges the formula — for example, a = √(c² − b²). The hypotenuse must be longer than the leg, or there is no such triangle.
What are the angles of the triangle?
One angle is always 90°. The other two are found with inverse sine: the angle opposite side a is arcsin(a / c), and the angle opposite side b is 90° minus that. For a 3-4-5 triangle the angles are 36.87° and 53.13°.
What is a Pythagorean triple?
A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Builders use the 3-4-5 triple to check that a corner is square: measure 3 units along one wall and 4 along the other, and the diagonal between the marks should be exactly 5.
Last updated: