Pythagorean theorem calculator

a² + b² = c². With legs 3 and 4 the hypotenuse is 5. Leave the unknown side empty.

a = 3, b = 4, c = 5
right triangle sides
6area
12perimeter
36.8699°angle opposite a
53.1301°angle opposite b
  1. c² = a² + b² = 9 + 16 = 25
  2. c = √25 = 5

The theorem

c = √(a² + b²)    a = √(c² − b²)

It applies only to right triangles; c is always the side opposite the right angle and the longest side.

Pythagorean triples

abc
345
51213
81517
72425
202129
94041
6810
121620

Builders use 3-4-5 to check a corner is square: mark 3 ft on one wall and 4 ft on the other; the diagonal should be exactly 5 ft.

Frequently asked questions

Does it work for any triangle?
No, only right triangles. For other triangles use the law of cosines (see the triangle calculator).
How do I find a leg?
Subtract the square of the known leg from the square of the hypotenuse and take the square root.