Pythagorean theorem
calculator

Two sides known. One side to find.
See the triangle and the steps behind your answer.

Missing side c: 5.

abc

Right triangle: a = 3, b = 4, c = 5. Not to scale.

Hypotenuse c

5

Length in your chosen unit.

c = √(3² + 4²) = 5

Leg a
3
Leg b
4
Hypotenuse c
5
Area (square units)
6
Perimeter (units)
12

For right triangles only. Updates as you type. Results shown to up to 10 significant digits.

A right angle.
A reliable rule.

This Pythagorean theorem calculator finds the length of a missing side when you know the other two sides of a right triangle. Select the side you need, enter the known lengths, and read the result with its calculation. All three sides use the same measurement unit.

The Pythagorean theorem formula

The two legs, a and b, meet at the 90° angle. The side across from that angle is c, the hypotenuse. Their relationship is:

a² + b² = c²
Find c: c = √(a² + b²)
Find a: a = √(c² − b²)
Find b: b = √(c² − a²)

For a geometry reference, see OpenStax’s Pythagorean theorem explanation. The rule depends on the right angle; it is not a formula for arbitrary triangles.

Why the hypotenuse must be longer

Suppose a known leg is 7 and c is 5. Subtraction would give 25 − 49, which is negative, so no real missing side exists. If the two lengths are equal, the remaining side would be zero. Neither case makes a right triangle; the calculator asks you to correct the lengths.

Follow the
missing side.

Example: find the diagonal of a rectangle

A rectangle 6 units wide and 8 units high has a right-triangle diagonal. Square the two lengths: 36 + 64 = 100. Taking the square root gives a diagonal of 10 units. That triangle’s area is 6 × 8 ÷ 2 = 24 square units, and its perimeter is 6 + 8 + 10 = 24 units.

Example: work backward from the hypotenuse

If c is 17 and one leg is 8, the missing leg is √(17² − 8²) = √(289 − 64) = √225 = 15. When solving for a leg, subtract its known companion’s square from the hypotenuse’s square.

Common Pythagorean triples
Leg aLeg bHypotenuse c
345
51213
81517
94041

A triple has three whole-number side lengths that satisfy the equation. Multiplying every side by the same positive factor preserves the right triangle. Decimal lengths work too; a whole-number answer is not required.

Input and display limits

Enter positive decimal lengths or scientific notation from 1e-9 to 1e9. Do not include commas or unit words in the fields. The diagram identifies the sides rather than drawing their proportions. Displayed values use up to 10 significant digits; keep your input precision in mind when using a rounded result.

Know which
side is which.

How do I find the hypotenuse?

Choose Hypotenuse c, enter legs a and b, and calculate √(a² + b²). For legs 9 and 12, c = √225 = 15.

Can this calculator find either leg?

Yes. Choose Leg a or Leg b, then enter the known leg and the hypotenuse. The hypotenuse must be strictly longer than the known leg.

Can I use centimeters, inches, or feet?

Yes, provided both entered lengths use the same unit. If your sides are in centimeters, the missing side and perimeter are in centimeters and the area is in square centimeters. Convert mixed units before entering them.

Does the Pythagorean theorem work for every triangle?

No. It requires one 90° angle. If the triangle is not right-angled, you need a different relationship, such as the law of cosines.

Why does the triangle drawing stay the same shape?

It is a labeled guide, not a scale drawing. The calculated numbers describe your triangle; the diagram keeps the right angle and side names easy to see, even for very unequal lengths.

Is this Pythagorean theorem calculator free?

Yes. Custom sides, area, perimeter, and copying are free, without an account. Inputs and results stay in this tab.

Working with measured numbers?

Count significant figures Standard deviation calculatorAll tools