Pythagorean Theorem Calculator

Instantly find the missing side of any right triangle with a full step-by-step breakdown. Choose from two modes:

  • Find the hypotenuse — Enter both legs (a and b) to calculate the hypotenuse (c)
  • Find a missing leg — Enter one leg and the hypotenuse to find the other leg

Enter two legs (a and b) to find the hypotenuse (c)

Enter both legs

Formulas Used

Pythagorean theorem

Solve for hypotenuse

Solve for a missing leg

How to Use This Calculator

  1. Select a mode using the buttons at the top
  2. Enter your values in the input fields
  3. See the result immediately with a full step-by-step solution

Every calculation shows exactly how the answer was derived, so you can follow the method while getting your answer. If the sides form a Pythagorean triple (all integers), the calculator will note that too.

What Is the Pythagorean Theorem?

The Pythagorean theorem states that in any 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:

a2+b2=c2a^2 + b^2 = c^2

where aa and bb are the two legs and cc is the hypotenuse. This relationship only applies to right triangles — triangles with one 90-degree angle.

To find the hypotenuse, rearrange to c=a2+b2c = \sqrt{a^2 + b^2}. To find a missing leg, rearrange to a=c2b2a = \sqrt{c^2 - b^2}.

Common Pythagorean Triples

A Pythagorean triple is a set of three positive integers that satisfy a2+b2=c2a^2 + b^2 = c^2. Memorizing a few of these can save time on tests and in the field:

Legs (a, b)Hypotenuse (c)Check
3, 459+16=259 + 16 = 25
5, 121325+144=16925 + 144 = 169
8, 151764+225=28964 + 225 = 289
7, 242549+576=62549 + 576 = 625

Any multiple of a Pythagorean triple is also a triple. For example, doubling 3-4-5 gives 6-8-10, and tripling it gives 9-12-15. This is useful when working with scaled dimensions in construction or drafting.

When You’ll Need This

The Pythagorean theorem comes up constantly in practical and professional situations:

  • Carpentry and framing — Checking whether a corner is square by measuring a 3-4-5 triangle (or any multiple like 6-8-10) is one of the oldest tricks in the trade. If the diagonal measures exactly what the theorem predicts, the corner is a true 90 degrees.
  • Construction and layout — Calculating diagonal bracing lengths, rafter lengths, and staircase measurements all rely on right-triangle math. Knowing the rise and run of a roof lets you compute the rafter length directly.
  • Electricians and cable runs — When running conduit or cable through walls, ceilings, and floors, the actual length of a diagonal run is the hypotenuse of the horizontal and vertical distances.
  • Landscaping — Figuring out the actual distance across a sloped yard when you know the horizontal distance and the elevation change.
  • Navigation and surveying — Calculating straight-line distances from north-south and east-west measurements.

Want to understand the full theory behind this formula? Read our Pythagorean Theorem tutorial for a complete explanation with worked examples and practice problems.