Formula
a² + b² = c²c = √(a² + b²), a = √(c² − b²) How it works
In any right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides, called the legs. This relationship, credited to the Greek mathematician Pythagoras, lets you find any side when you know the other two.
To find the hypotenuse, add the squares of the legs and take the square root. To find a leg, subtract the square of the known leg from the square of the hypotenuse, then take the square root. The hypotenuse is always the longest side, so a leg can never be longer than it.
Some right triangles have whole-number sides, called Pythagorean triples: 3-4-5, 5-12-13, 8-15-17 and 7-24-25 are the most common, and any multiple of one (like 6-8-10) works too. Builders use the 3-4-5 triple to check that corners are square.
Frequently asked questions
Does the theorem work for triangles without a right angle?
No. For other triangles use the law of cosines, c² = a² + b² − 2ab·cos C, which reduces to the Pythagorean theorem when C = 90°. The triangle calculator handles any three sides.
How do I find distance on a graph with it?
The horizontal and vertical gaps between two points are the legs, and the straight-line distance is the hypotenuse: d = √(Δx² + Δy²).