CalcPro

Pythagorean Theorem Calculator

Solve a² + b² = c² for the hypotenuse or a missing leg.

The Pythagorean theorem in context

The Pythagorean theorem is one of the most fundamental relationships in geometry. It applies exclusively to right triangles—the ones with a 90-degree angle. The two sides that form the right angle are called legs (a and b), and the side opposite the right angle is the hypotenuse (c), which is always the longest side.

How it works

This calculator takes two known measurements from a right triangle and solves for the third using the Pythagorean relationship. You choose whether you're finding the hypotenuse (when you know both legs) or a missing leg (when you know one leg and the hypotenuse). The calculator then applies the appropriate formula, handles the square root calculation, and returns your answer to several decimal places.

The formula

c = √(a² + b²) or a = √(c² − b²) depending on what you're solving for

When finding the hypotenuse: square each leg, add them together, then take the square root of the result. When finding a leg: square the hypotenuse, subtract the square of the known leg, then take the square root.

Worked example

Let's say you're building a ramp and need to find the length of the sloped surface. Your horizontal distance is 6 meters and your vertical rise is 8 meters. These form the two legs of a right triangle, and the ramp length is the hypotenuse.

Step 1: Square the first leg: 6² = 36

Step 2: Square the second leg: 8² = 64

Step 3: Add them: 36 + 64 = 100

Step 4: Take the square root: √100 = 10

Your ramp needs to be 10 meters long.

Now imagine you know the ramp is 10 meters and the horizontal distance is 6 meters, but you need the height:

Step 1: Square the hypotenuse: 10² = 100

Step 2: Square the known leg: 6² = 36

Step 3: Subtract: 100 − 36 = 64

Step 4: Take the square root: √64 = 8

The vertical rise is 8 meters.

Common mistakes

One frequent error is confusing which side is the hypotenuse. Remember: it's always the longest side, and it's always opposite the right angle—never one of the sides that forms the right angle itself. Another pitfall is forgetting to square the individual legs before adding them; you must square first, then add, then take the square root. Also, double-check that your triangle actually has a right angle. If you're measuring a real-world object, use a carpenter's square or verify the angle carefully, because the theorem only works when that 90-degree angle is precise.

Frequently asked questions

What is the Pythagorean theorem?

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse (the longest side opposite the right angle) equals the sum of the squares of the other two sides. It's written as a² + b² = c², where c is the hypotenuse.

Can I use this calculator for any triangle?

No. This calculator only works for right triangles—triangles with one 90-degree angle. If your triangle doesn't have a right angle, the Pythagorean theorem doesn't apply.

What if I only know one leg and the hypotenuse?

You can still find the missing leg. Rearrange the formula to a² = c² − b², then take the square root. This calculator handles that automatically when you select 'Leg' mode.

Why do I get a decimal answer?

Most right triangles produce irrational numbers when you apply the theorem. For example, a 1-1-√2 triangle has sides of 1, 1, and approximately 1.414. Decimals are the practical way to express these values.

What are real-world uses of the Pythagorean theorem?

It's used in construction (checking if corners are square), surveying, navigation, computer graphics, and anywhere you need to find distances or verify right angles. Builders often use the 3-4-5 triangle rule as a quick check.

Is there a limit to the side lengths I can enter?

No hard limit, but extremely large numbers may cause rounding. Also, remember that in a right triangle, the hypotenuse must always be longer than either leg—if it isn't, you have an error in your input.