Home โ€บ Math โ€บ Pythagorean Theorem Calculator
FreeHypotenuse or legArea & anglesShows the formula

Pythagorean Theorem Calculator

Pick the side you want to find, enter the other two, and get the missing side, area, perimeter, both acute angles and the formula with your numbers.

๐Ÿ“Your result will appear here
โšก InstantUpdates as you type
๐Ÿ”’ PrivateRuns in your browser
๐Ÿ†“ FreeNo sign-up needed
๐Ÿ“ฑ Mobile readyWorks on any screen

How to use the Pythagorean Theorem Calculator

Choose the unknown side
Select hypotenuse c if you know both legs. Select leg a or leg b if you know the hypotenuse and the other leg.
Enter the two known sides
Type the lengths in any one unit (inches, feet, meters). The answer comes out in the same unit.
Read the full triangle
You get the missing side, the area, the perimeter, both acute angles and the formula with your numbers filled in.

The formula

a² + b² = c²
Hypotenuse: c = √(a² + b²)
Leg: a = √(c² − b²)
Area = a × b ÷ 2

What is the Pythagorean theorem?

The Pythagorean theorem describes how the three sides of a right triangle (a triangle with one 90 degree corner) are related. If the two shorter sides, called legs, have lengths a and b, and the longest side opposite the right angle, called the hypotenuse, has length c, then a² + b² = c².

It only works for right triangles. It is one of the most used formulas in geometry, building, navigation and everyday measuring, because it lets you find a length you cannot measure directly.

How to find the hypotenuse step by step

  1. Square the first leg (multiply it by itself).
  2. Square the second leg.
  3. Add the two squares together.
  4. Take the square root of the sum. That is the hypotenuse.
Example: legs of 6 and 8. 6² = 36 and 8² = 64. The sum is 100, and √100 = 10. The hypotenuse is 10.

How to find a missing leg

When you know the hypotenuse and one leg, subtract instead of adding.

  1. Square the hypotenuse.
  2. Square the known leg.
  3. Subtract the smaller square from the larger one.
  4. Take the square root.
Example: hypotenuse 13 and leg 5. 13² = 169 and 5² = 25. 169 − 25 = 144, and √144 = 12. The missing leg is 12.

Because the hypotenuse is always the longest side, a leg can never be equal to or longer than it. If you get that, the numbers were entered in the wrong boxes.

Tips for using the calculator

  • Use one unit for everything. Convert inches to feet (or the reverse) before you enter numbers.
  • c is always the longest side. It sits opposite the right angle.
  • Check the angles. The two acute angles must add up to 90 degrees. The calculator shows both so you can check your work.
  • Decimals are fine. Results are shown to four decimal places, so round to suit your project.

Common Pythagorean triples

A Pythagorean triple is a set of whole numbers that fits the theorem exactly. They are handy for quick mental checks and for squaring corners on a job site.

Leg aLeg bHypotenuse c
345
51213
81517
72425
202129

Any multiple of a triple also works, so 6-8-10 and 9-12-15 are both right triangles.

Real-life uses

Carpenters use the 3-4-5 rule to check that a corner is square: measure 3 units along one wall, 4 along the other, and the diagonal should be exactly 5. The theorem also gives the length of a ladder needed to reach a window, the diagonal of a TV screen or a rectangular room, the length of a ramp, and the straight-line distance between two points on a map grid.

For a rectangle, the diagonal is the hypotenuse of a right triangle formed by the length and width.

How the angles are found

Once all three sides are known, each acute angle comes from trigonometry. Angle A (opposite leg a) equals the inverse tangent of a divided by b. Angle B equals the inverse tangent of b divided by a. Together with the 90 degree corner, the three angles always add to 180 degrees.

Special right triangles

Two right triangles come up so often that they are worth memorizing. The 45-45-90 triangle has two equal legs, and the hypotenuse is the leg times 1.4142 (the square root of 2). A square with a side of 10 has a diagonal of about 14.14. The 30-60-90 triangle has sides in the ratio 1 : 1.732 : 2, so the hypotenuse is always twice the shortest leg. If the short leg is 5, the other leg is 8.66 and the hypotenuse is 10.

You can test any answer from the calculator against these shortcuts. Entering two legs of 1 and 1 should give 1.4142, and entering a hypotenuse of 10 with a leg of 5 should give a missing leg of 8.6603 and angles of 30 and 60 degrees.

Remember the theorem also works backward. If three side lengths satisfy a² + b² = c², the triangle has a right angle, which is how builders check that a frame is square.

Frequently asked questions

What is the Pythagorean theorem formula?

aยฒ + bยฒ = cยฒ, where a and b are the legs of a right triangle and c is the hypotenuse, the side opposite the right angle.

Does the Pythagorean theorem work on any triangle?

No. It only works on right triangles. For other triangles you need the law of cosines, which reduces to the Pythagorean theorem when the angle is 90 degrees.

Which side is the hypotenuse?

The hypotenuse is the longest side of a right triangle and is always across from the 90 degree angle.

Can I use any units?

Yes, as long as every side uses the same unit. The answer will be in that unit, and the area will be in that unit squared.

Why does the calculator say the hypotenuse must be longer than a leg?

In a right triangle the hypotenuse is the longest side, so a leg equal to or larger than it is not possible. Check that you typed the longest side in the hypotenuse box.

How do I find the diagonal of a rectangle?

Use the length and width as the two legs and solve for the hypotenuse. A 12 by 16 rectangle has a diagonal of 20.

Please note: Results are for general math and planning use. For construction or engineering work, confirm measurements on site and follow the plans and local codes.

More calculators