Pythagorean Theorem Calculator

Solve for the hypotenuse or any missing side of a right triangle using a² + b² = c². Enter two known sides and get an instant answer with step-by-step working.

Pythagorean Theorem Calculator

Calculate the missing side of a right triangle using the Pythagorean theorem: a² + b² = c²

Triangle Sides
Enter any 2 known values to calculate the third side. Leave the unknown side empty.
Result
Calculated using the Pythagorean theorem

No result yet

Enter 2 valid positive numbers to see the calculation

How the Pythagorean Theorem Works

The Pythagorean theorem is one of the most fundamental relationships in geometry. It states that in any right triangle, the area of the square built on the hypotenuse equals the combined areas of the squares built on the two legs. Algebraically this is written as a² + b² = c², where c is the hypotenuse (the longest side, opposite the 90° angle) and a and b are the two shorter sides (legs).

Solving for the Hypotenuse

c = √(a² + b²)

When you know both legs, square each one, add the results together, and take the square root. For example, with legs of 6 and 8: c = √(36 + 64) = √100 = 10.

Solving for a Missing Leg

a = √(c² - b²)

When you know the hypotenuse and one leg, rearrange the formula. Square the hypotenuse, subtract the square of the known leg, and take the square root. For example, if c = 13 and b = 5: a = √(169 - 25) = √144 = 12.

Why It Only Works for Right Triangles

The theorem depends on the 90° angle. In an obtuse triangle a² + b² < c², and in an acute triangle a² + b² > c². For non-right triangles, the generalized version is the Law of Cosines: c² = a² + b² - 2ab·cos(C).

Checking Your Work

After finding a missing side, verify by plugging all three values back into a² + b² = c². If both sides of the equation are equal, your answer is correct. Our calculator does this automatically and displays each verification step.

Pythagorean Triples and Special Right Triangles

Certain right triangles have side lengths that are all whole numbers. These integer solutions are called Pythagorean triples. Memorizing common triples lets you solve many geometry problems instantly, without a calculator. Beyond integer triples, two families of special right triangles appear constantly in trigonometry and standardized tests.

Primitive Triples

A primitive triple has no common factor greater than 1. These are the building blocks — every other Pythagorean triple is a multiple of a primitive one.

  • • (3, 4, 5)
  • • (5, 12, 13)
  • • (8, 15, 17)
  • • (7, 24, 25)
  • • (20, 21, 29)

Scaled Triples

Multiplying every side of a triple by the same integer produces another valid triple. The (3, 4, 5) family alone generates infinitely many:

  • • (6, 8, 10) — ×2
  • • (9, 12, 15) — ×3
  • • (15, 20, 25) — ×5
  • • (30, 40, 50) — ×10
  • • (10, 24, 26) — from (5, 12, 13) ×2

Special Right Triangles

Two special right triangles have exact side ratios involving square roots:

  • 45-45-90: sides in the ratio 1 : 1 : √2. Both legs are equal and the hypotenuse is √2 times a leg. This is the isosceles right triangle.
  • 30-60-90: sides in the ratio 1 : √3 : 2. The shortest side is opposite 30°, the medium side (√3 times the shortest) is opposite 60°, and the hypotenuse is twice the shortest side.

Real-World Applications of the Pythagorean Theorem

Far from being a purely academic exercise, the Pythagorean theorem is one of the most practically applied results in all of mathematics. Anywhere a right angle exists and a diagonal or straight-line distance is needed, this theorem provides the answer.

Construction & Carpentry

  • • Verifying 90° corners with the 3-4-5 rule
  • • Calculating roof rafter and stair stringer lengths
  • • Determining diagonal bracing for wall framing
  • • Laying out foundations and concrete forms

Navigation & Surveying

  • • Finding straight-line distance between two GPS coordinates
  • • Calculating ship or aircraft course corrections
  • • Land surveying and property boundary measurements
  • • Triangulation for locating positions

Architecture & Engineering

  • • Designing wheelchair ramps to ADA specifications
  • • Calculating cable lengths for suspension bridges
  • • Sizing HVAC ductwork running at angles
  • • Structural load analysis on inclined beams

Technology & Science

  • • Computing pixel distances in computer graphics
  • • Calculating TV and monitor diagonal screen sizes
  • • Measuring Euclidean distance in machine learning
  • • Physics vector magnitude calculations

Frequently Asked Questions

What is the Pythagorean theorem?

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides. Written as a formula: a² + b² = c², where c is the hypotenuse and a and b are the two legs. This theorem is attributed to the ancient Greek mathematician Pythagoras, though it was known to Babylonian mathematicians over a thousand years earlier.

How do you find the hypotenuse of a right triangle?

To find the hypotenuse, use the formula c = √(a² + b²). Square each leg, add them together, then take the square root. For example, if the two legs are 3 and 4, the hypotenuse is √(3² + 4²) = √(9 + 16) = √25 = 5. Our calculator performs this computation instantly and shows each step of the process.

What are Pythagorean triples?

Pythagorean triples are sets of three positive integers (a, b, c) that satisfy a² + b² = c². The most well-known triple is (3, 4, 5). Other common examples include (5, 12, 13), (8, 15, 17), (7, 24, 25), and (20, 21, 29). Any multiple of a Pythagorean triple is also a triple — for instance, doubling (3, 4, 5) gives (6, 8, 10), which also satisfies the theorem.

Does the Pythagorean theorem work for all triangles?

No, the Pythagorean theorem applies only to right triangles — triangles that contain exactly one 90-degree angle. For non-right triangles you need the Law of Cosines: c² = a² + b² - 2ab·cos(C), which generalizes the Pythagorean theorem. When C = 90°, cos(90°) = 0 and the formula reduces back to a² + b² = c².

How is the Pythagorean theorem used in real life?

The Pythagorean theorem is used extensively in construction (ensuring walls are square, calculating roof rafter lengths), navigation (finding straight-line distances), architecture (diagonal bracing), surveying (measuring land), and computer graphics (calculating pixel distances). Carpenters routinely use the 3-4-5 rule to verify right angles on job sites.

What is the distance formula and how does it relate to the Pythagorean theorem?

The distance formula d = √((x₂ - x₁)² + (y₂ - y₁)²) is a direct application of the Pythagorean theorem. The horizontal difference (x₂ - x₁) and vertical difference (y₂ - y₁) form the two legs of a right triangle, and the straight-line distance between the points is the hypotenuse. This extends to three dimensions as d = √((x₂ - x₁)² + (y₂ - y₁)² + (z₂ - z₁)²).

Related Calculators