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 two legs: a² + b² = c².
Choose which side to solve for. The hypotenuse is always the longest side, so when solving for a leg, the hypotenuse you enter must be longer than the other leg.
Whole-number solutions like 3-4-5, 5-12-13 and 8-15-17 are called Pythagorean triples. Builders use 3-4-5 to check that corners are square.
Formula
c = √(a² + b²); a = √(c² − b²); b = √(c² − a²)
Questions people ask
Does the Pythagorean theorem work for any triangle?
No, only right triangles. For other triangles use the law of cosines: c² = a² + b² − 2ab·cos C, which reduces to the Pythagorean theorem when C = 90°.
How do I check if a corner is square?
Measure 3 units along one side and 4 along the other. If the diagonal between those marks is exactly 5, the corner is 90°. Scale up (6-8-10, 9-12-15) for more accuracy.
How do I find the diagonal of a rectangle?
The diagonal is the hypotenuse of a right triangle whose legs are the length and width. A 6 × 8 rectangle has a 10-unit diagonal.