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.