You're Building a Roof and Need to Know the Diagonal Length Across a 12 × 9 Room
The Pythagorean theorem (a² + b² = c²) is one of geometry's most practical formulas. It relates the sides of any right triangle, letting you find a missing dimension if you know the other two. But calculating squares, then taking square roots, is a multi-step process prone to arithmetic errors. A Pythagorean theorem calculator removes the algebra friction and gets you the answer instantly, often with a diagram showing your triangle.
What This Calculator Does
The Pythagorean theorem calculator takes two sides of a right triangle and returns the third. Enter two sides (it doesn't matter which-the calculator figures it out), and it applies the Pythagorean theorem, showing the intermediate steps: squaring the known sides, adding them, and taking the square root of the result. The final answer is exact for perfect Pythagorean triples (like 3-4-5) or a decimal approximation for other cases. You also typically get a labeled diagram of your triangle.
How to Use This Calculator
Enter any two sides of a right triangle. The calculator can determine which is which. Hit calculate. The calculator shows the Pythagorean theorem formula applied to your specific numbers, the intermediate arithmetic, and the missing side length.
For example, enter 5 and 12 as the two known sides. The calculator shows 5² = 25, 12² = 144, 25 + 144 = 169, √169 = 13. The missing side is 13. This is the famous 5-12-13 Pythagorean triple, used in construction for centuries.
The Formula Behind the Math
The Pythagorean Theorem: a² + b² = c², where c is the hypotenuse (the longest side, opposite the right angle) and a and b are the other two sides.
Finding the hypotenuse: If you know both legs (a and b), find c:
Example: a = 6, b = 8
This is the 6-8-10 triangle, a multiple of the famous 3-4-5 triple.
Finding a missing leg: If you know the hypotenuse (c) and one leg (a), find b:
Example: c = 13, a = 5
This reveals why the 5-12-13 triple works: 5² + 12² = 25 + 144 = 169 = 13².
Verification: The theorem also checks if a triangle is truly a right triangle. If a² + b² = c², it's right-angled. If a² + b² > c², it's acute. If a² + b² < c², it's obtuse. Only right triangles satisfy the Pythagorean theorem exactly.
Our calculator does all of this instantly-but now you understand exactly what it's computing. The Pythagorean theorem is timeless because it's so useful: distance, construction, navigation, and physics all rely on it.
Real Example: Roof Diagonal
Your garage is 20 feet wide and 24 feet long. A diagonal brace needs to span the corner. What length should the brace be? Use the Pythagorean theorem: the diagonal is √(20² + 24²) = √(400 + 576) = √976 ≈ 31.24 feet. Enter 20 and 24 into the calculator. You get 31.24 feet. Now you can order or cut the brace to exactly the right length.
Ladder Safety
You're leaning a ladder against a wall. The ladder is 10 feet long, and you position the base 6 feet from the wall. How high does the ladder reach? The ladder, wall, and ground form a right triangle. The ladder is the hypotenuse (10 feet), the wall is one leg (unknown), and the ground is the other leg (6 feet). Use the calculator: c = 10, a = 6, find b. You get √(100 - 36) = √64 = 8 feet high. The ladder reaches 8 feet.
Land Surveying and Property Corners
A surveyor measures a property and finds two sides of the property boundary are 150 meters and 200 meters at a right angle. What's the diagonal distance? Enter 150 and 200. The calculator shows √(150² + 200²) = √(22500 + 40000) = √62500 = 250 meters. The property's diagonal is 250 meters.
Tips and Things to Watch Out For
The hypotenuse is always the longest side. In a right triangle, c is longer than both a and b. If you enter numbers where one side is longer than the supposed hypotenuse, something's wrong with your setup.
The Pythagorean theorem only works for right triangles. If your triangle doesn't have a 90-degree angle, the theorem doesn't apply. The calculator assumes you have a right triangle; verify yours has a right angle before using it.
Perfect Pythagorean triples are rare. The 3-4-5 and 5-12-13 triples produce clean whole number results. Most real-world problems yield decimal results. That's normal and expected.
Decimal approximations are sufficient for practical purposes. If the calculator returns 13.416..., rounding to 13.42 or 13.4 is usually fine. Construction tolerances allow small variations.
You don't need to know which side is the hypotenuse. The calculator figures it out-if you enter the longest side, it treats it as the hypotenuse. If you enter two legs, it calculates the hypotenuse.
Frequently Asked Questions
What's a right triangle?
A right triangle has one 90-degree angle (a right angle). The side opposite the right angle is the hypotenuse, the longest side. The other two sides are called legs.
What's a Pythagorean triple?
A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c². The most famous is 3-4-5. Others include 5-12-13, 8-15-17, and 7-24-25. Multiples also work: 6-8-10, 9-12-15, 10-24-26.
Can I use the Pythagorean theorem in 3D?
The Pythagorean theorem applies in 3D as an extension: a² + b² + c² = d², where d is the diagonal through 3D space. Some advanced calculators handle 3D distances; the standard Pythagorean theorem calculator handles 2D right triangles.
What if my triangle isn't a right triangle?
The Pythagorean theorem doesn't apply. You'd need the Law of Cosines (a more general formula) to find missing sides. This calculator is for right triangles specifically.
How do I verify my answer?
Use the reverse: if you calculated c from a and b, check that a² + b² = c². If it does, you're correct. Many calculators show this verification automatically.
What's the longest possible hypotenuse?
Mathematically, there's no limit. The longer the legs, the longer the hypotenuse. A 100-meter by 100-meter right triangle has a hypotenuse of about 141.42 meters.
Related Calculators
The square root calculator helps you take the square root step if you're doing the Pythagorean theorem by hand. The triangle calculator finds areas and other properties of triangles, including right triangles. The distance calculator computes distances between two points, which is another application of the Pythagorean theorem.