Xerobit

Pythagorean Theorem Calculator: Solve Any Missing Side

Enter any two known sides of a right triangle and this pythagorean theorem calculator solves for the missing third side instantly. It uses the formula a² + b² = c² and shows every step of the math so you can follow along. The tool runs entirely in your browser and nothing is uploaded.

Result

  • Missing side
    c (hypotenuse) = 5
  • Steps
    c = √(a² + b²) c = √(3² + 4²) c = √(9 + 16) c = √(25) c = 5

How to use the pythagorean theorem calculator

  1. Enter the lengths of any two sides of the right triangle into the fields above.
  2. Leave the field for the unknown side blank. That is the value the calculator will solve for.
  3. Read the result and the step-by-step breakdown showing how a² + b² = c² was applied.
  4. Use the solved sides to compute area, perimeter or angles if needed.

How the Pythagorean theorem works

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. Written as an equation: a² + b² = c², where c is always the hypotenuse (the side opposite the 90-degree angle) and a and b are the other two sides.

To use this pythagorean theorem calculator, you rearrange the formula depending on which side is missing. If you need the hypotenuse, compute c = √(a² + b²). If you need a leg, subtract the known leg's square from the hypotenuse's square: a = √(c² - b²).

For example, if leg a is 6 and leg b is 8, then c = √(36 + 64) = √100 = 10. The steps panel above mirrors this exact arithmetic so you can verify each operation.

Common Pythagorean triples

A Pythagorean triple is a set of three positive integers that satisfy a² + b² = c² exactly. Memorizing a few triples makes mental math faster when you work with right triangles regularly.

Leg aLeg bHypotenuse c
345
51213
81517
72425
94041
202129

Any multiple of a triple is also a triple. For instance, multiplying 3-4-5 by 2 gives 6-8-10, which this hypotenuse calculator confirms instantly.

Practical uses of the right triangle formula

The right triangle calculator is not just a classroom exercise. Builders use it to check that corners are perfectly square by measuring 3 feet along one wall, 4 feet along the other, and confirming the diagonal is exactly 5 feet. Carpenters call this the 3-4-5 method.

In navigation, if you travel 30 km north and then 40 km east, your straight-line distance back to the start is the hypotenuse: √(30² + 40²) = 50 km. Screen sizes for televisions and monitors are measured diagonally, so knowing the width and height lets you compute the advertised size using the same formula.

Programmers use the theorem to calculate distances between points on a 2D plane, which is foundational for collision detection in games and spatial queries in mapping software.

Common mistakes to avoid

The most frequent error is mixing up which side is the hypotenuse. The hypotenuse is always the longest side and always sits opposite the right angle. If you enter a value for c that is shorter than one of the legs, no real solution exists because you would be taking the square root of a negative number.

Another mistake is forgetting to square the values before adding or subtracting. The relationship is a² + b² = c², not a + b = c. Adding the raw side lengths together gives the perimeter, not the hypotenuse.

Finally, ensure all measurements use the same unit before entering them. Mixing centimeters and inches without converting first will produce a numerically correct but physically meaningless answer. Use a dedicated converter if your inputs are in different units.

Beyond the basic theorem

The Pythagorean theorem extends naturally into three dimensions. To find the space diagonal of a rectangular box with length l, width w and height h, apply the formula twice: d = √(l² + w² + h²). This is useful for determining whether a long object fits inside a shipping container.

The theorem also generalizes to the law of cosines, c² = a² + b² - 2ab·cos(C), which works for any triangle, not just right triangles. When angle C is 90 degrees, the cosine term becomes zero and the formula reduces back to a² + b² = c².

If you need to work with fractional side lengths, you may want to convert decimals to fractions for cleaner notation. Tools like the decimal to fraction converter pair well with this calculator when precision matters in woodworking or machining.

Worked examples

Each result below was produced by the same code the tool runs, so you can check your own numbers against them.

ExampleInputResult
Classic 3-4-5 triangleSide a (leg): 3; Side b (leg): 4Missing side: c (hypotenuse) = 5; Steps: c = √(a² + b²) c = √(3² + 4²) c = √(9 + 16) c = √(25) c = 5
Find a leg from hypotenuseSide a (leg): 5; Side c (hypotenuse): 13Missing side: b (leg) = 12; Steps: b = √(c² - a²) b = √(13² - 5²) b = √(169 - 25) b = √(144) b = 12
Isosceles right triangleSide a (leg): 1; Side b (leg): 1Missing side: c (hypotenuse) = 1.41421356237; Steps: c = √(a² + b²) c = √(1² + 1²) c = √(1 + 1) c = √(2) c = 1.41421356237
Large dimensionsSide a (leg): 100; Side c (hypotenuse): 125Missing side: b (leg) = 75; Steps: b = √(c² - a²) b = √(125² - 100²) b = √(15,625 - 10,000) b = √(5,625) b = 75

FAQ

What is the Pythagorean theorem?

It is a geometric rule stating that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c².

How do I find the hypotenuse?

Square both legs, add the results together, then take the square root. For legs of 3 and 4, the hypotenuse is √(9 + 16) = √25 = 5.

Can I use this calculator to find a leg instead of the hypotenuse?

Yes. Leave the leg field blank and enter the other leg plus the hypotenuse. The tool rearranges the formula automatically to solve for the missing leg.

Why does the calculator show an error when I enter all three sides?

This pythagorean theorem calculator needs exactly two known sides to solve for the third. Entering all three leaves nothing to calculate, and they might not even form a valid right triangle.

Does the theorem work for non-right triangles?

No. For triangles without a 90-degree angle, you need the law of cosines instead. The Pythagorean theorem applies exclusively to right triangles.

Are my measurements sent to a server?

No. All calculations happen locally in your browser. Nothing you type is uploaded anywhere.