Pythagorean Theorem Calculator

What's the missing side of your right triangle?

Calculate the missing side of any right triangle when you know the other two sides. Perfect for construction, carpentry, navigation, and homework problems.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Imagine stretching a rope around three stakes to form a triangle. If you make one corner exactly 90 degrees, the rope forms a right triangle. The Pythagorean theorem states that the square of the longest side (hypotenuse) always equals the sum of squares of the two shorter sides. This relationship, a² + b² = c², works for every right triangle regardless of size.

The theorem emerges from the geometric relationship between squares built on each side of a right triangle. If you construct actual squares on each side, the area of the square on the hypotenuse exactly equals the combined areas of the squares on the two legs. This visual proof demonstrates why the mathematical relationship holds universally.

In practical terms, the theorem lets you find any missing side when you know the other two. Construction workers use it to ensure corners are perfectly square, navigators use it to calculate direct distances, and engineers use it to determine structural loads and forces in right-angled frameworks.

When To Use This
Right tool, right situation

Use the Pythagorean theorem whenever you need to find a missing dimension in any right-angled situation. Construction projects rely heavily on this calculation to ensure square corners in framing, to calculate diagonal bracing lengths, and to verify that structures are plumb and level. Carpenters use the 3-4-5 triangle method to quickly check if corners are square without measuring the actual angle.

Navigation and mapping applications frequently use the theorem to calculate direct distances. If you know how far north and how far east a destination lies from your current position, the theorem gives you the straight-line distance. This works for GPS calculations, flight planning, and hiking route optimization.

However, do not use this calculator for triangles that are not right triangles, for measurements involving curved surfaces, or for situations where the triangle assumption does not fit the real-world geometry. Sloped roofs, curved paths, and irregular shapes require different mathematical approaches that account for their specific geometric properties.

Common Mistakes
Why results sometimes look wrong

The most common mistake is applying the theorem to triangles that are not right triangles. Students often try to use a² + b² = c² for any triangle, but the relationship only holds when one angle measures exactly 90 degrees. Using it on acute or obtuse triangles produces incorrect results that can lead to serious errors in construction or design projects.

Another frequent error involves incorrectly identifying which side is the hypotenuse. The hypotenuse is always the longest side and always sits opposite the right angle. Some people mistakenly treat any side as the hypotenuse, leading to impossible results like negative values under the square root when rearranging the formula.

Unit confusion creates practical problems when people mix measurements. If one leg is measured in feet and another in inches, the calculated hypotenuse will be meaningless. All three sides must use the same unit of measurement for the result to have any real-world value in construction, navigation, or engineering applications.

The Math
Worked examples and deeper derivation

The Pythagorean theorem formula a² + b² = c² represents one of mathematics most reliable relationships. The variables a and b represent the legs (shorter sides) of a right triangle, while c represents the hypotenuse (longest side opposite the right angle). To find the hypotenuse, you calculate the square root of the sum of the squares of the two legs.

When solving for a missing leg instead of the hypotenuse, you rearrange the formula. If you know the hypotenuse c and one leg a, then b = √(c² - a²). This rearrangement comes from basic algebraic manipulation of the original equation, moving terms to isolate the unknown variable.

The theorem only applies to right triangles because the 90-degree angle creates the specific geometric relationship between the sides. For triangles without right angles, the relationship breaks down, and you need different formulas like the law of cosines, which reduces to the Pythagorean theorem when one angle equals 90 degrees.

Building a deck corner brace
Side A: 6 feet, Side B: 8 feet
Result: 10 feet. You need a 10-foot diagonal brace to create a perfect right angle corner on your deck frame. This ensures your deck is square and structurally sound.
TV wall mount positioning
Side A: 24 inches, Side B: 18 inches
Result: 30 inches. The diagonal distance from the corner of your wall mount bracket to the opposite corner is 30 inches. This helps you verify the mount is level and properly aligned.
Soccer field corner flag distance
Side A: 50 yards, Side B: 100 yards
Result: 111.8 yards. The diagonal distance from one corner flag to the opposite corner is about 112 yards. Coaches use this measurement to plan diagonal passing drills and field coverage strategies.
Expert Unlock
The thing most explanations skip

Professional contractors often use Pythagorean triples - sets of three whole numbers that satisfy the theorem - for quick field calculations without calculators. The 3-4-5 ratio scales infinitely: 6-8-10, 9-12-15, 30-40-50 all work. However, most real-world applications produce irrational hypotenuse values that require decimal precision for accurate construction.

How do I know which side is the hypotenuse?

What if I know the hypotenuse and one side?
You can find the missing leg by rearranging the formula. If you know the hypotenuse (c) and one leg (a), then the other leg equals the square root of c² - a². The hypotenuse is always the longest side opposite the right angle.
Does this work for any triangle?
No, this only works for right triangles that have exactly one 90-degree angle. For other triangles, you need different formulas like the law of cosines or law of sines.
Why do I get decimal answers for whole number inputs?
Most right triangles produce irrational numbers for the hypotenuse, even with simple whole number sides. Only special Pythagorean triples like 3-4-5, 5-12-13, or 8-15-17 produce whole number results for all three sides.

Need something this doesn't cover?

Suggest a tool — we'll build it →