Pythagorean Theorem Calculator
This Pythagorean theorem calculator finds the missing side of a right triangle in seconds. Enter the two legs to get the hypotenuse, or switch modes to find a leg from the hypotenuse and the other side. You'll see the answer, the area and perimeter, the full a² + b² = c² steps, and a diagram that redraws to match your triangle, so the math and the shape always agree.
- Find the hypotenuse
- Or a missing leg
- Area and perimeter
- Live triangle diagram
- Steps shown
Last updated June 16, 2026 a² + b² = c² Reviewed by the Calcowa math team
Enter two positive sides. For a leg, the hypotenuse must be the longest.
c = √(3² + 4²) = √25 = 5
What is the Pythagorean theorem?
The Pythagorean theorem is the rule that ties the three sides of a right triangle together. It says the square of the hypotenuse, the longest side, equals the squares of the other two sides added together, and that's the whole rule. The two short sides that meet at the square corner are the legs, a and b, and the side across from that corner is the hypotenuse, c. As long as the triangle has a 90-degree angle, this holds every time, and it doesn't care how big the triangle is.
How to find the hypotenuse
Here's how to find the hypotenuse of a triangle with legs 3 and 4:
- 1
Square each leg3² = 9 and 4² = 16.
- 2
Add them9 + 16 = 25.
- 3
Take the square root√25 = 5, so the hypotenuse is 5.
How to find a missing leg
When you've already got the hypotenuse and one leg, you rearrange the theorem to a = √(c² − b²). Square the hypotenuse, subtract the square of the leg you know, and take the root. So with a hypotenuse of 13 and a leg of 5, the missing leg is √(169 − 25) = √144 = 12. Pick the "Find a leg" mode above and the calculator does the rearranging, so you don't have to.
Pythagorean triples
Some right triangles have sides that are all whole numbers, called Pythagorean triples. They're all over textbooks because the answers stay tidy. Here are a few worth recognizing.
| Triple (a, b, c) | Why it matters |
|---|---|
| 3, 4, 5 | The classic right triangle |
| 5, 12, 13 | Common in geometry problems |
| 8, 15, 17 | Another whole-number set |
| 6, 8, 10 | Just the 3-4-5 triple doubled |
| 7, 24, 25 | A larger Pythagorean triple |
Frequently asked questions
Which side is the hypotenuse?
It's the longest side, and it always sits directly across from the right angle. The other two sides, the ones that form the square corner, are the legs. If you're solving for the hypotenuse, you add; if you're solving for a leg, you subtract.
The Pythagorean theorem says that in a right triangle, the square of the longest side equals the sum of the squares of the other two. In symbols it's a² + b² = c², where c is the hypotenuse. It only works for right triangles, and it won't work on any other shape.
Square both shorter sides, add them, and take the square root. For legs of 3 and 4, that's √(3² + 4²) = √(9 + 16) = √25 = 5. The hypotenuse is always the longest side, and it's opposite the right angle.
Rearrange the theorem to a = √(c² − b²). Square the hypotenuse, subtract the square of the known leg, and take the root. If the hypotenuse is 13 and one leg is 5, the other is √(169 − 25) = √144 = 12. Switch to the "Find a leg" mode above and you've got it.
It's a² + b² = c². Here a and b are the two legs that meet at the right angle, and c is the hypotenuse across from it. You rearrange it to c = √(a² + b²) for the hypotenuse, or a = √(c² − b²) for a leg.
A Pythagorean triple is a set of three whole numbers that fit the theorem exactly, like 3, 4, 5 or 5, 12, 13. They're handy because the sides come out as neat whole numbers, and any multiple of a triple, such as 6, 8, 10, is also a triple, so you'll spot them everywhere.
No, only on right triangles, where one angle is exactly 90 degrees. For triangles without a right angle you'd use the law of cosines instead. If your triangle's got a square corner, though, the theorem is exact every time.
Related calculators
More tools for triangles and shapes.
Solve all sides and angles.
Area calculatorTriangle, circle, and more.
All math calculatorsPercent, fractions, averages, more.
Solving a right triangle?
Enter two sides above, or browse the full math hub.