Home / Math Calculators / Pythagorean Theorem Calculator

Pythagorean Theorem Calculator

Find the missing side of a right triangle using the Pythagorean theorem. Enter any two side lengths to calculate the third side, then review the formula, steps, angles, area, and perimeter.

Enter the known sides

The hypotenuse is opposite the 90° angle and is the longest side.
Use the same unit for both entered sides.
Enter the first leg length.
Enter the second leg length.
Leave the selected side blank; it will be calculated from the other two sides.

The Pythagorean theorem applies only to right-angled triangles. If you solve for a leg, the hypotenuse must be longer than the known leg. This calculator performs calculations in your browser.

Your result

Calculated hypotenuse (c)
5 units
For legs a = 3 and b = 4, the hypotenuse is 5 units.
c = √(a² + b²) = √(3² + 4²) = 5
Leg a3 units
Leg b4 units
Hypotenuse c5 units
Triangle area6 square units
Perimeter12 units
Acute angles36.8699° / 53.1301°

Right triangle diagram

a = 3b = 4c = 590°

Diagram is illustrative and may not be drawn to exact scale.

Check: a² + b² = c². For this example, 9 + 16 = 25.

Step-by-step solution

  1. Use the formula c = √(a² + b²).
  2. Substitute the known values: c = √(3² + 4²).
  3. Simplify: c = √25 = 5.

What is the Pythagorean theorem?

The Pythagorean theorem describes the relationship between the three sides of a right triangle. If a and b are the legs that meet at the right angle and c is the hypotenuse, the equation is:

a² + b² = c²

Formulas for the missing side

  • Find the hypotenuse: c = √(a² + b²)
  • Find leg a: a = √(c² − b²)
  • Find leg b: b = √(c² − a²)

How to use this calculator

  1. Choose the side you want to calculate: a leg or the hypotenuse.
  2. Enter the two known side lengths. Leave the side being calculated blank.
  3. Choose the unit and preferred decimal precision.
  4. Select Calculate to view the missing side, equation, triangle properties, and working steps.
  5. Check that all side lengths are positive and the hypotenuse is the longest side.

Worked example: a 3–4–5 triangle

If a = 3 units and b = 4 units, then c = √(3² + 4²) = √(9 + 16) = √25 = 5 units. The area is (3 × 4) ÷ 2 = 6 square units, and the perimeter is 3 + 4 + 5 = 12 units.

Frequently asked questions

Can I calculate any side of a right triangle?

Yes. Choose the hypotenuse or either leg as the unknown, then enter the other two sides. If finding a leg, the hypotenuse must be greater than the known leg.

What is the hypotenuse?

The hypotenuse is the side opposite the 90-degree angle. It is always the longest side of a right triangle.

Can I enter decimal values?

Yes. Positive decimal values are supported. Results are rounded to the number of decimal places you select.

Can I mix centimeters and inches?

No. Enter both known sides using the same unit. Convert one measurement first if your original values use different units.

Does this theorem work for every triangle?

No. It applies to right triangles only. For a triangle without a 90-degree angle, a different method such as the law of cosines is needed.

Where is the Pythagorean theorem used?

It is used to calculate diagonals, distances between points, ladder lengths, ramp measurements, construction layouts, and geometry problems involving right angles.

This calculator is an educational aid. Verify input measurements and use appropriate professional guidance for safety-critical construction or engineering decisions.