Math Calculators

Pythagorean Theorem Calculator

Enter two sides of a right triangle to solve for the third

What this calculator does

The Pythagorean Theorem Calculator applies the relationship a² + b² = c² to a right triangle. Choose the side you want to find, enter the other two sides, and the calculator returns the missing length together with the area and perimeter of the triangle.

The theorem is one of the most widely used results in geometry. It connects the two legs of a right triangle to the hypotenuse: the square of the hypotenuse equals the sum of the squares of the legs. It is used to check square corners, find diagonal distances, size braces and ramps, and solve problems in physics and computer graphics.

How to use this calculator

  1. Choose what to solve for: the hypotenuse c, leg a, or leg b.
  2. Enter the two known sides.
  3. Click Calculate.
  4. Read the missing side, area, and perimeter.

The default example solves for the hypotenuse with legs a = 3 and b = 4. The result is c = 5, the area is 6 square units, and the perimeter is 12 units. Solving for a with b = 4 and c = 5 returns a = 3, and solving for b with a = 3 and c = 5 returns b = 4.

Pythagorean theorem formulas

Hypotenuse: c = √(a² + b²)
Leg a:      a = √(c² − b²)
Leg b:      b = √(c² − a²)
Area:       A = ½ab
Perimeter:  P = a + b + c

The theorem only applies when c is the hypotenuse, meaning the side opposite the right angle. If the known hypotenuse is not longer than the known leg, the square root would receive a negative number, so the calculator reports an error.

What the results mean

The highlighted result is the side you chose to solve for. The supporting rows show all three sides, the area, and the perimeter. The area and perimeter are included because they are common follow-up values when working with a right triangle.

Some results are exact integers, such as the 3-4-5 triangle. Many others are irrational. For example, legs 1 and 1 produce a hypotenuse of √2, which is approximately 1.41421356. The displayed value is rounded, but the calculation keeps full floating-point precision.

Assumptions and limitations

  • The triangle must have a right angle, and c must be the hypotenuse.
  • Every known side must be greater than zero.
  • The known hypotenuse must be longer than the known leg.
  • All lengths must use the same unit. No unit conversion is performed.
  • The calculator solves from side lengths only. It does not accept angles.
  • The theorem applies to flat, two-dimensional Euclidean geometry. It does not directly apply to triangles on a sphere or another curved surface.
  • Results are rounded for display.

Frequently asked questions

What happens if the hypotenuse is shorter than a leg?

A right triangle cannot have a hypotenuse shorter than either leg. If you enter such values, the calculator stops with an error message. Check whether the longest side was entered as the hypotenuse and whether the two known values belong to the same triangle.

Can I use the Pythagorean theorem for any triangle?

No. The relationship a² + b² = c² holds only for right triangles. For other triangles, use the law of cosines, which includes an extra term involving the cosine of the angle between the known sides. The Triangle Calculator accepts three sides and handles non-right triangles.

Are the results in the same unit as the inputs?

Yes. The calculator treats the inputs as plain lengths in one common unit. The missing side, area, and perimeter use that unit, with area expressed in square units. Convert every input to the same unit before calculating.

Reference tables

Angle formulas

arcsin(a)
αOpposite leg aHypotenuse c
arcsin(b)
βOpposite leg bHypotenuse c

The right angle is opposite the hypotenuse. The two acute angles sum to 90°. Area = ½ab and perimeter = a + b + c.

Source

Reference: Calculator.net — Pythagorean Theorem Calculator.

This page is for general educational and estimation purposes. Verify measurements before construction, fabrication, or navigation use.

Math Calculators