Geometry Calculator

Pythagorean Theorem Calculator

Find the longest side of a right-angled triangle from the two sides that meet at the right angle.

Maintained by Kumara Samigari LokeshMethod: c = √(a² + b²)Methods and limitations

What this calculator does

Enter the two shorter sides (legs) of a right-angled triangle. The calculator returns the hypotenuse, the side opposite the right angle, which is always the longest.

Formula used

a² + b² = c², so c = √(a² + b²)

The theorem applies only to right-angled triangles.

Worked examples

  • Sides 3 and 4: c = √(9 + 16) = √25 = 5
  • Sides 5 and 12: c = √(25 + 144) = 13
  • A TV 121.8 cm wide and 68.5 cm tall has a diagonal of about 139.7 cm, which is 55 inches.

Whole-number sets like 3-4-5 and 5-12-13 are called Pythagorean triples.

Finding a missing shorter side

If you know the hypotenuse c and one leg a, rearrange: b = √(c² − a²). A 5 m ladder with its foot 3 m from a wall reaches √(25 − 9) = 4 m up the wall. This calculator solves for the hypotenuse only, so do this rearrangement by hand or with the scientific calculator.

Practical uses

  • Checking a corner is square during construction: measure 3 units along one side and 4 along the other; the diagonal should be exactly 5. Builders call this the 3-4-5 method.
  • Screen and frame diagonals.
  • Straight-line distance between two points on a map grid.
  • Length of a ramp or roof rafter from its rise and run.

Common mistakes

  • Using it for a triangle that is not right-angled.
  • Adding the sides before squaring: (3 + 4)² is not 3² + 4².
  • Entering the hypotenuse as one of the legs.

FAQs

What is the Pythagorean theorem?

In a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides.

Can I find a shorter side?

Yes, with b = √(c² − a²). This tool calculates the hypotenuse only.

Does it work for non-right triangles?

No. For those, use the law of cosines.

How is the answer rounded?

To two decimal places.

What is the 3-4-5 rule?

A triangle with sides 3, 4 and 5 always has a right angle, which builders use to set out square corners.