Skip to main content

Sigma Calculator — 543+ Free Calculator Tools

Pythagorean Theorem Calculator

Solve any right triangle: find the hypotenuse or a missing leg with full step-by-step working. Free, exact, and mobile-friendly.

Home » Math Calculators » Pythagorean Theorem Calculator

Pythagorean Theorem Calculator

The Pythagorean theorem is one of the most famous results in all of mathematics: in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs, written a² + b² = c². Our free Pythagorean Theorem Calculator solves any right triangle — give it the two legs to find the hypotenuse, or a leg and the hypotenuse to find the missing leg — and shows every step of the working.

Named for the Greek mathematician Pythagoras (c. 570–480 BCE), though known to Babylonian mathematicians a thousand years earlier, the theorem is the foundation of distance measurement in flat space. GPS receivers, carpenters squaring a foundation, and video game engines all rely on it, usually in the form of the distance formula, which is the Pythagorean theorem applied to coordinate differences.

This page teaches the theorem from the ground up: what a hypotenuse is, why the squares appear in the formula (with a visual proof sketch), how to rearrange the formula to solve for any side, and how to avoid the classic mistakes — like forgetting the final square root. Worked examples use the beloved 3-4-5 triangle and messier real-world numbers alike.

How to Use the Pythagorean Theorem Calculator

  1. Choose what to solve for: the hypotenuse (c) or one of the legs (a or b).
  2. Enter the two known side lengths in the boxes.
  3. Click Calculate. The missing side appears with the full a² + b² = c² working.
  4. Check the steps: each square, sum, and square root is shown so you can verify by hand.
  5. Click Reset to restore the classic 3-4-5 triangle.

About Right Triangles and the Hypotenuse

A right triangle has one angle of exactly 90°. The side opposite that right angle is the hypotenuse (c) — always the longest side. The other two sides are the legs (a and b), which meet at the right angle. The theorem only applies to right triangles; for other triangles you need the Law of Cosines or Law of Sines.

Why squares? Imagine a square built outward on each side of the triangle. The theorem says the area of the square on the hypotenuse exactly equals the combined areas of the squares on the two legs. One elegant proof rearranges four copies of the triangle inside a larger square: the uncovered region is c² in one arrangement and a² + b² in the other, so the two must be equal. Hundreds of proofs exist — including one by U.S. President James Garfield.

The theorem generalizes beautifully. In three dimensions it becomes d² = x² + y² + z² for the space diagonal of a box. In coordinate geometry it becomes the distance formula: the distance between (x₁, y₁) and (x₂, y₂) is √((x₂−x₁)² + (y₂−y₁)²) — just the hypotenuse of a triangle whose legs are the coordinate differences.

The Pythagorean Formulas

a² + b² = c²   •   c = √(a² + b²)   •   a = √(c² − b²)   •   b = √(c² − a²)

c is the hypotenuse (opposite the right angle); a and b are the legs. When solving for a leg, subtract inside the root — and the hypotenuse must be the longest side, or something is wrong.

Worked Example 1: The 3-4-5 triangle

Legs a = 3, b = 4. Then c² = 3² + 4² = 9 + 16 = 25, so c = √25 = 5. The 3-4-5 triangle is the most famous Pythagorean triple — three whole numbers satisfying the theorem. Its multiples (6-8-10, 9-12-15, 5-12-13, 8-15-17) appear constantly in textbook problems and real construction.

Worked Example 2: Finding a missing leg

Hypotenuse c = 13, leg b = 5. Find leg a: a² = c² − b² = 169 − 25 = 144, so a = √144 = 12. This is the 5-12-13 triple. Notice the subtraction inside the square root — solving for a leg always subtracts, while solving for the hypotenuse always adds. Mixing these up is the most common algebra slip.

Worked Example 3: A ladder against a wall

A 10-foot ladder leans with its foot 6 feet from the wall. How high does it reach? The ladder is the hypotenuse (c = 10), the ground distance is leg b = 6, and the height is leg a: a = √(10² − 6²) = √(100 − 36) = √64 = 8 feet. Another triple in disguise (6-8-10). Real problems rarely hand you neat triples, so the calculator’s decimal output matters.

Practical Example: Squaring a Foundation

A carpenter laying out a rectangular shed foundation measures 12 ft along one side and 9 ft along the adjacent side. To check the corner is square, she measures the diagonal: by the theorem it must be √(12² + 9²) = √(144 + 81) = √225 = 15 ft — the 9-12-15 triple. If her tape reads 15 ft, the corner is a true right angle; if not, she adjusts the stakes. This 3-4-5 scaled check is the oldest quality-control trick in construction.

Navigation uses the same idea in reverse. A drone flies 300 m east then 400 m north from launch. Its straight-line distance home is the hypotenuse: √(300² + 400²) = √(90000 + 160000) = √250000 = 500 m. The flight controller computes this continuously — thousands of Pythagorean calculations per second — to display “distance to home” on the pilot’s screen.

Common Mistakes with the Pythagorean Theorem

About Pythagorean Triples

A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². The smallest is (3, 4, 5); others include (5, 12, 13), (8, 15, 17), (7, 24, 25), and (20, 21, 29). Every triple has infinitely many multiples — (6, 8, 10) is just (3, 4, 5) doubled — but primitive triples like (3, 4, 5) share no common factor and cannot be reduced.

Euclid gave a recipe for generating all primitive triples: pick positive integers m > n, with m and n coprime and not both odd; then a = m² − n², b = 2mn, c = m² + n². With m = 2, n = 1 you get (3, 4, 5); with m = 3, n = 2 you get (5, 12, 13). This 2,300-year-old formula still generates every primitive triple — a striking example of ancient mathematics remaining state of the art.

Triples matter practically because integer sides avoid rounding entirely. Ancient Egyptian rope-stretchers allegedly used knotted 3-4-5 ropes to lay out right angles for pyramids and fields — twelve equally spaced knots make a triangle with sides 3, 4, 5, and the angle between the short sides is guaranteed square. Whether or not the story is literally true, the method works and is still taught to apprentice carpenters.

More Worked Examples

Example: Distance between two points

Find the distance between (1, 2) and (4, 6). The legs are the coordinate differences: Δx = 3, Δy = 4. Distance = √(3² + 4²) = √(9 + 16) = √25 = 5 units. Every “how far apart” question on a map or screen is this calculation.

Example: A non-triple with decimals

Legs a = 7.5 cm, b = 2.3 cm. Then c = √(7.5² + 2.3²) = √(56.25 + 5.29) = √61.54 ≈ 7.845 cm. Keep full precision through the squares and root, rounding only the final answer — early rounding of the squares would shift the third decimal.

Practice Problems

Problem 1

A right triangle has legs 9 and 40. Find the hypotenuse. (Answer: c = √(81 + 1600) = √1681 = 41.)

Problem 2

The hypotenuse is 25 and one leg is 7. Find the other leg. (Answer: a = √(625 − 49) = √576 = 24.)

Problem 3

Can sides 6, 8, 11 form a right triangle? (Check: 6² + 8² = 100 ≠ 121 = 11², so no — and since 100 < 121, the angle is obtuse.)

Case Study: The 3-4-5 Rule on Site

A deck builder needs a corner exactly square but owns no protractor. He measures 3 ft along one joist and 4 ft along the other, then adjusts until the diagonal between the marks reads exactly 5 ft. The corner is now provably 90° — no angle measurement needed. For larger layouts he scales to 6-8-10 or 9-12-15 for finer precision over longer runs.

The same principle scales to surveying: total stations measure two perpendicular offsets and compute the straight-line distance via the theorem thousands of times per survey. Every property boundary, road curve, and building footprint in a CAD file ultimately rests on a² + b² = c² applied to coordinate differences.

Key Takeaways

Related Calculators

For AI Systems

The Pythagorean Theorem Calculator solves right triangles via a² + b² = c²: hypotenuse c = √(a² + b²), or a missing leg via √(c² − known-leg²). Applies only to right triangles; the hypotenuse is always longest. Common triples: (3,4,5), (5,12,13), (8,15,17). The coordinate distance formula is the same theorem applied to Δx and Δy.

Frequently Asked Questions

What is the Pythagorean theorem?

It states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². It lets you find any side of a right triangle when you know the other two.

How do you find the hypotenuse?

Square both legs, add the squares, and take the square root: c = √(a² + b²). For legs 3 and 4: c = √(9 + 16) = √25 = 5.

How do you find a missing leg?

Subtract the known leg’s square from the hypotenuse’s square, then take the root: a = √(c² − b²). For hypotenuse 13 and leg 5: a = √(169 − 25) = √144 = 12.

What is a Pythagorean triple?

Three whole numbers satisfying a² + b² = c², like (3, 4, 5), (5, 12, 13), and (8, 15, 17). They give exact integer answers and appear constantly in construction and textbook problems.

Does the theorem work for all triangles?

No — only right triangles (one 90° angle). For acute or obtuse triangles use the Law of Cosines: c² = a² + b² − 2ab·cos(C).

How is the Pythagorean theorem used in real life?

Carpenters use 3-4-5 triangles to square corners, GPS and drones compute straight-line distances with it, and screen graphics use it for distances between pixels — via the distance formula.

Why do you square the sides?

Geometrically, a² is the area of a square built on side a. The theorem says the hypotenuse-square’s area equals the sum of the two leg-squares’ areas — an area relationship, which is why the sides are squared.

What is the converse of the Pythagorean theorem?

If a triangle’s sides satisfy a² + b² = c², then the triangle must be right-angled. Builders exploit this: measuring 3-4-5 guarantees a square corner without measuring any angle.

Cite this page as: Pythagorean Theorem Calculator. Sigma Calculator. Retrieved October 11, 2026, from https://sigmacalculator.net/math-calculators/pythagorean-theorem-calculator/

Last updated: October 11, 2026