Skip to content
LunaCalc

Math

Pythagorean Theorem Calculator

Solve right-triangle sides with the Pythagorean theorem.

About this calculator

This Pythagorean theorem calculator solves right-triangle side lengths when two sides are known.

Formula notes

For a right triangle, a^2 + b^2 = c^2, where c is the hypotenuse.

Worked examples

  1. Example: legs 3 and 4 give hypotenuse 5, because 3^2 + 4^2 = 9 + 16 = 25.
  2. A right triangle with legs 9 and 12 has hypotenuse sqrt(9^2 + 12^2) = 15 and area 9 x 12 / 2 = 54.

How to use it

  1. Enter the two known sides.
  2. Identify whether you are solving for a leg or the hypotenuse.
  3. Read the missing side length.

Frequently asked questions

Does this work for non-right triangles?

No. The Pythagorean theorem applies only to right triangles.

How can I check whether three sides form a right triangle?

Sort them so c is longest, then test whether a^2 + b^2 equals c^2 within the measurement tolerance.

Limits and interpretation

  • The theorem applies only to a right triangle; using it on an arbitrary triangle produces an invalid side relationship.
  • Measured sides must share one unit, and rounded measurements can make the computed triangle appear slightly inconsistent.

References