Geometry

Pythagorean Theorem Calculator

Find the hypotenuse of a right triangle from its two legs, or find a missing leg from the hypotenuse and the other leg.

The theorem

In a right triangle, a² + b² = c², where a and b are the two shorter sides (legs) and c is the longest side (the hypotenuse), opposite the right angle. Rearranged: c = √(a² + b²), a = √(c² − b²), and b = √(c² − a²).

Worked example

A right triangle with legs of 3 and 4 has a hypotenuse of √(3² + 4²) = √(9 + 16) = √25 = 5 — the classic 3-4-5 right triangle used throughout construction and geometry to check for a true right angle.

Common uses

  • Checking whether a corner is a true right angle using the 3-4-5 rule
  • Finding the diagonal distance across a rectangular space
  • Working out cable, ladder, or ramp lengths that span a height and a horizontal distance

What each mode needs

  • Hypotenuse mode takes both legs and returns √(a² + b²).
  • Leg mode takes the other leg and the hypotenuse and returns √(c² − known²).
  • Answers are shown to four decimals. Every number must be greater than zero.
  • In leg mode the hypotenuse must be longer than the known leg. If it is equal or shorter, the tool says so, because that triangle cannot exist.

More worked examples

Legs of 1 and 1 give a hypotenuse of 1.4142. Legs of 2.4 and 1.8 give exactly 3.0000. With a hypotenuse of 13 and a known leg of 12, the missing leg is 5.0000. A hypotenuse of 10 with a known leg of 7 leaves 7.1414.

Screen sizes: a 1920 × 1080 rectangle has a diagonal of 2202.9072, in the same unit as the sides.

Limits

The tool assumes the triangle is right-angled; it cannot test whether a triangle given as three sides actually is. It returns only the missing side, not the area, perimeter or angles. For a unit conversion, use matching units for every input.

Frequently asked questions

Does this work for any triangle?

No — the Pythagorean theorem only applies to right triangles (triangles with one 90° angle). For other triangles, a different method like the law of cosines is needed.

How is the 3-4-5 rule used on a job site?

Measure 3 units along one side from a corner and 4 units along the perpendicular side, then check that the diagonal between those two points measures exactly 5 units — if it does, the corner is a true 90°.

Why does it say the hypotenuse must be longer than the known leg?

The hypotenuse is the longest side of a right triangle. If c is not larger than the leg you entered, c² − leg² is zero or negative, so no real side exists.

Can I find a screen or TV diagonal with it?

Yes, if the screen is rectangular: enter the width and height as the two legs. 1920 and 1080 give 2202.9072.

Does it show the area or the angles?

No. It reports a single missing side to four decimals. Use the Area & Perimeter Calculator for area.

Related calculators