Pythagorean Theorem Calculator 🔒 Your data never leaves your browser.
Find the hypotenuse or a missing leg of a right triangle.
About this tool
The Pythagorean theorem applies to right triangles — triangles with one 90° angle. It states that the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides, the legs: a² + b² = c². Switch to "Find hypotenuse (c)" to enter the two legs and instantly see the hypotenuse, or switch to "Find a missing leg" to enter one leg and the hypotenuse and solve for the other leg.
A quick way to check the math in your head is the classic 3-4-5 triangle: 3² + 4² = 9 + 16 = 25, and 25 is 5², so a triangle with legs 3 and 4 has a hypotenuse of exactly 5. Any multiple of 3-4-5 (like 6-8-10) works the same way, which makes it a handy sanity check whenever you're measuring a room, laying out a deck, or squaring up a frame and want to confirm a corner is truly a right angle. Everything is calculated instantly in your browser, and nothing you type is ever sent anywhere.
Frequently asked questions
Does this work for triangles that aren't right triangles?
No — the Pythagorean theorem applies specifically and only to right triangles (those with exactly one 90° angle). For a general triangle without a right angle, you'd need the Law of Cosines instead, which is a more general formula that reduces to the Pythagorean theorem as a special case when the angle between the two known sides happens to be 90°. If your triangle doesn't have a right angle marked or implied, the numbers this tool produces won't be valid for it.