Pythagorean Theorem

a² + b² = c² for right triangles — sides in any length unit.

Side c
5 ft

Enter the two known sides; the unknown is solved automatically.

How to Use the Pythagorean Theorem Calculator

  1. Select which side you want to find: the hypotenuse (c) or one of the legs (a or b).
  2. Enter the length of the first known side in the corresponding input field.
  3. Enter the length of the second known side in the next input field.
  4. Click **Calculate** — the tool instantly computes the missing side using a² + b² = c².
  5. Read your result, rounded to two decimal places, displayed beneath the inputs.
  6. Use the **Reset** button to clear all fields and start a new calculation.

The Pythagorean Theorem Formula

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

For any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. To find the hypotenuse c, take the square root of the sum of the squares of legs a and b. To find a missing leg, rearrange the formula: subtract the square of the known leg from the square of the hypotenuse, then take the square root.

  • a — The length of the first leg of the right triangle (one of the two sides that form the 90° angle).
  • b — The length of the second leg of the right triangle (the other side that forms the 90° angle).
  • c — The length of the hypotenuse — the longest side of the right triangle, located opposite the right angle.
  • — The square root operation. The result is always a positive (non-negative) real number for valid side lengths.

Worked Example: Finding the Hypotenuse

Leg a = 3 units, Leg b = 4 units
c = √(3² + 4²) = √(9 + 16) = √25 = 5

Result: Hypotenuse c = 5 units

What Your Result Means

When the two legs measure 3 and 4 units, the hypotenuse is exactly 5 units. This is the famous 3-4-5 Pythagorean triple — one of the simplest whole-number solutions to the theorem. The result tells you the straight-line distance between the two far corners of the right triangle, which is always the longest side.

Understanding Pythagorean Theorem

What Is the Pythagorean Theorem?

The Pythagorean Theorem states that in any right triangle (a triangle containing a 90° angle), the square of the length of the hypotenuse equals the sum of the squares of the other two sides:

a² + b² = c²

The theorem is named after the ancient Greek mathematician Pythagoras of Samos (c. 570–495 BCE), although evidence of the relationship appears in Babylonian and Indian mathematics centuries earlier.

Why Does It Matter?

The Pythagorean Theorem is one of the most widely applied equations in mathematics and everyday life:

  • Construction & architecture — verifying square corners, calculating rafter lengths, and laying out foundations.
  • Navigation — finding straight-line (as-the-crow-flies) distances on a map.
  • Physics & engineering — resolving vector components, calculating resultant forces and velocities.
  • Computer graphics — computing pixel distances and collision detection.
  • Surveying — determining land boundaries and elevations.

Pythagorean Triples

A Pythagorean triple is a set of three positive integers (a, b, c) that perfectly satisfy a² + b² = c². Common examples include:

| a | b | c | |---|---|---| | 3 | 4 | 5 | | 5 | 12 | 13 | | 8 | 15 | 17 | | 7 | 24 | 25 |

Multiples of any triple also form a triple (e.g., 6-8-10 is a multiple of 3-4-5).

The Converse of the Theorem

If the three sides of a triangle satisfy a² + b² = c², the triangle must be a right triangle. This is used in construction (the "3-4-5 rule") to confirm that corners are perfectly square.

Extending to 3D: The Space Diagonal

For a rectangular box with dimensions l, w, and h, the space diagonal d is:

d = √(l² + w² + h²)

This is simply the Pythagorean Theorem applied twice in sequence.

Common Mistakes

  • **Confusing legs and hypotenuse** — Always assign the longest side to c (the hypotenuse), not a or b.
  • **Forgetting the square root** — a² + b² = c² gives you c², so you must take √(a² + b²) to get c.
  • **Using the theorem on non-right triangles** — The formula only applies when one angle is exactly 90°. Use the Law of Cosines for other triangles.
  • **Mixing units** — Both legs must be in the same unit (e.g., both in metres or both in feet) before calculating.
  • **Rounding intermediate steps** — Round only the final answer to avoid compounding rounding errors in multi-step problems.
  • **Entering the hypotenuse as a leg** — When solving for a missing leg, make sure c is the hypotenuse value, not one of the legs.

Common Questions About Pythagorean Theorem

What is a Pythagorean triple?

A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². The smallest and most famous example is (3, 4, 5). Multiplying all three numbers by the same integer (e.g., 6, 8, 10) produces another valid triple.

How do I check if a triangle is a right triangle?

Square all three side lengths. If the sum of the two smaller squares equals the largest square — i.e., a² + b² = c² — the triangle is a right triangle by the converse of the Pythagorean Theorem.

How is the Pythagorean Theorem used in real life?

It is used to measure diagonal distances (e.g., screen size, staircase length), verify square corners in construction, calculate shortest paths in navigation, and find vector magnitudes in physics and engineering.

What is the relationship between the Pythagorean Theorem and the distance formula?

They are the same concept. The distance formula d = √((x₂−x₁)² + (y₂−y₁)²) is simply the Pythagorean Theorem applied to a right triangle formed by the horizontal and vertical differences between two coordinate points.

Is there a Pythagorean Theorem for three dimensions?

Yes. The 3D distance (space diagonal) is d = √(a² + b² + c²), which applies the 2D theorem twice — first to the base and then incorporating the height.

Frequently Asked Questions

Can I use this calculator to find a missing leg, not just the hypotenuse?

Yes. Select the leg you want to find (a or b), then enter the hypotenuse and the other leg. The calculator rearranges the formula to a = √(c² − b²) or b = √(c² − a²) automatically.

What units does the calculator use?

The calculator is unit-agnostic. Enter any consistent unit — centimetres, metres, inches, feet, etc. — and the result will be in the same unit. Just make sure both inputs use the same unit.

What happens if I enter a leg length that is larger than the hypotenuse?

That input combination is geometrically impossible. The calculator will flag an error because the expression under the square root (c² − a²) would be negative, meaning no real solution exists.

Does the theorem work for all triangles?

No. The Pythagorean Theorem applies **only to right triangles**. For triangles with no 90° angle, use the Law of Cosines: c² = a² + b² − 2ab·cos(C).

Can I enter decimal or fractional side lengths?

Absolutely. The calculator accepts any positive real number, including decimals like 2.5 or 7.07. The result is rounded to two decimal places.

Related Calculators

Sources

Only sources that have been reviewed are shown. Unverified citations are never published.

Spotted a calculation error?Report an Error