Pythagorean Theorem Calculator

Find the hypotenuse of a right triangle from its two legs — plus area and perimeter.

Hypotenuse (c)
5.0000
  1. Hypotenuse (c)5.0000
  2. Triangle area6.0000
  3. Perimeter12.0000
Inputs used
  • Leg a3
  • Leg b4

About this calculator

The Pythagorean theorem says that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: c² = a² + b². Enter the legs and the hypotenuse is the square root of that sum — the classic 3-4-5 triangle gives √(9 + 16) = 5.

To find a missing leg instead, rearrange: a = √(c² − b²). Enter the hypotenuse as one "leg" here and take the result with the larger value as c — or simply check that the numbers satisfy a² + b² = c².

The theorem only holds for right triangles, but it hides everywhere: diagonal of a TV screen, the shortest path across a rectangular field, distance between two points on a map.

Quick reference

Hypotenuse by leg lengths

The hypotenuse c = √(a² + b²) for each pair of legs a (rows) and b (columns).

Leg a468101216
35.00006.70828.544010.440312.369316.2788
56.40317.81029.434011.180313.000016.7631
67.21118.485310.000011.661913.416417.0880
88.944310.000011.313712.806214.422217.8885
99.848910.816712.041613.453615.000018.3576
1212.649113.416414.422215.620516.970620.0000
1515.524216.155517.000018.027819.209421.9317
2020.396120.880621.540722.360723.323825.6125

Frequently asked questions

What is the Pythagorean theorem?

For a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Rearranged, the hypotenuse is c = √(a² + b²), so legs of 3 and 4 give √(9 + 16) = √25 = 5.

How do I find a missing leg instead of the hypotenuse?

Subtract instead of add: a = √(c² − b²), where c is the hypotenuse. For a hypotenuse of 13 and one leg of 5, the other leg is √(169 − 25) = √144 = 12.

What are the most common Pythagorean triples?

Whole-number right triangles like 3-4-5, 5-12-13, 8-15-17 and 7-24-25 — sets where a² + b² = c² comes out exact. Any multiple works too, so 6-8-10 is just the 3-4-5 triangle doubled.

Does the Pythagorean theorem work for any triangle?

No — only right triangles, where one angle is exactly 90°. For other triangles you need the law of cosines, which adds a correction term and reduces to a² + b² = c² only when the angle between the legs is a right angle.

Embed this calculator on your site

Paste this HTML where you want the calculator to appear. It stays free, works on any site, and updates automatically. Adjust the height to taste.

Results are informational only — not financial, medical or legal advice.