Geometry formulas

Pythagorean theorem

Calculate the hypotenuse or a missing leg of a right triangle from the lengths of the other two sides.

Formula

c2=a2+b2 c² = a² + b²

In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs.

Pythagorean theorem calculator

Which side do you want to calculate?

Known lengths

The result updates when a length changes.

Formula for the selected side

a: known side. b: known side. c: side being calculated

Result

5 m

Substitution and calculation

c = √(a² + b²) = √(3² + 4²) = 5 m

Right triangle
Right trianglea: known side; b: known side; c: side being calculated; right angle.abc ?
  • a: known side
  • b: known side
  • c: side being calculated (?)

Symbols and units

SymbolQuantitySISupported units
afirst legLength of one side adjacent to the right angle.mm, cm, mm, km
bsecond legLength of the other side adjacent to the right angle.mm, cm, mm, km
chypotenuseThe side opposite the right angle and the longest side of the triangle.mm, cm, mm, km

Formula rearrangements

Calculate the hypotenuse

c = √(a² + b²)

Calculate the first leg

a = √(c² - b²)

Calculate the second leg

b = √(c² - a²)

Worked examples

Hypotenuse of a 3-4-5 triangle

The legs of a right triangle are 3 m and 4 m long. Calculate the hypotenuse.

  1. 1Step 1: Square both legs: 3² = 9 and 4² = 16.
  2. 2Step 2: Add the squares: 9 + 16 = 25.
  3. 3Step 3: Take the square root of 25 to obtain 5 m.

Result: 5 m

Missing leg of a right triangle

The hypotenuse is 13 cm and one leg is 5 cm. Calculate the other leg.

  1. 1Step 1: Square the known sides: 13² = 169 and 5² = 25.
  2. 2Step 2: Subtract the known leg square from the hypotenuse square: 169 - 25 = 144.
  3. 3Step 3: Take the square root of 144 to obtain 12 cm.

Result: 12 cm

Sources and review