Skip to main content

Pythagorean Theorem Calculator


Quickly find any missing side of a right triangle with our Pythagorean Theorem Calculator. Enter two sides, choose which side to solve for, and get an instant, precise result along with the key steps and formula.

Note: Select which side to calculate and enter the other two sides. Leave the side you want to calculate blank.

Note: This calculator assumes a right triangle. Units can be any consistent length (cm, m, in, ft).

Embed this calculator

What the Pythagorean Theorem Says

The Pythagorean Theorem is a cornerstone of geometry and trigonometry. It 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 two legs. In symbols: a² + b² = c², where c is the hypotenuse and a and b are the legs. This relationship lets you solve for any unknown side when you know the other two.

How to Use the Pythagorean Theorem Calculator

  1. Select which side you want to calculate: hypotenuse c, leg a, or leg b.
  2. Enter the two known side lengths. If you’re calculating c, provide a and b. If you’re calculating a, provide b and c. If you’re calculating b, provide a and c.
  3. Optionally choose the number of decimal places for your result.
  4. Click Calculate to see the computed value and the formula steps.

Be sure your measurements represent a right triangle. The hypotenuse must always be the longest side, so c should be greater than either leg.

Why This Calculator Is Useful

Whether you’re a student solving homework, a DIYer checking a square corner, or a professional working with layouts and dimensions, precision matters. This calculator eliminates manual square and square-root computations, reduces rounding errors, and provides quick validation that your triangle dimensions make sense.

Key Features

  • Calculates hypotenuse (c) or either leg (a or b).
  • Flexible precision with selectable decimal places.
  • Clear step indication: shows the formula used for transparency.
  • Unit-agnostic: works with inches, centimeters, meters, or any consistent length unit.

Formula and Examples

For the hypotenuse: c = ?(a² + b²). For a leg: a = ?(c² ? b²) or b = ?(c² ? a²). Remember that c must be larger than the leg you subtract; otherwise the square root becomes invalid for real lengths.

Example 1: If a = 3 and b = 4, then c = ?(3² + 4²) = ?(9 + 16) = ?25 = 5. This classic 3–4–5 triangle is a quick check that your right angle is truly square.

Example 2: If c = 13 and b = 5, then a = ?(13² ? 5²) = ?(169 ? 25) = ?144 = 12. Notice that c (13) is greater than b (5), which is required for a valid right triangle calculation.

Common Mistakes to Avoid

  • Using the wrong side as the hypotenuse. The hypotenuse is always across from the right angle and is the longest side.
  • Trying to compute a leg with c smaller than the other leg. The result would require taking the square root of a negative number, which isn’t a real length.
  • Mixing units. Keep all lengths in the same unit before calculating.
  • Rounding too early. If you must round, round only the final answer to preserve accuracy.

Practical Applications

The Pythagorean Theorem appears in carpentry for squaring frames and walls, in navigation to estimate straight-line distances, and in construction site layouts where accurate offsets and diagonals ensure level, square results. It’s also foundational in physics and engineering, where vector components and right-triangle relationships show up constantly.

Tips for Reliable Results

  • Measure twice to reduce input error.
  • Use consistent units and avoid unit conversions mid-calculation.
  • Set decimal places according to your project’s tolerance (e.g., more decimals for fine machining, fewer for rough carpentry).

Next Steps

Enter your known sides and let the Pythagorean Theorem Calculator do the rest. You’ll get a fast, accurate answer along with the formula steps to help you learn, verify, and document your work.



Brian Mbiki of c4calc

Brian Mbiki

A Mathematician, Software and Web Development autodidact.

Brian Mbiki writes on Math, Software and web development and has keen interest in Cryptocurrency investments and Blockchain Technology.