Enter c and b to find a.
Pythagorean theorem formulas and worked examples
The Pythagorean theorem applies only to a right triangle—one with a 90-degree angle. The hypotenuse, labelled c, is the side opposite that angle and is the triangle’s longest side. The other two sides are the legs, a and b.
Choose the formula that matches the missing side
- Find the hypotenuse:
c = √(a² + b²). - Find leg a:
a = √(c² − b²). - Find leg b:
b = √(c² − a²).
Worked examples
If the legs are 3 and 4 units, then c = √(3² + 4²) = √25 = 5 units. If the hypotenuse is 13 units and one leg is 5 units, the missing leg is √(13² − 5²) = √144 = 12 units.
Use the same unit for both inputs. When finding a leg, the hypotenuse must be longer than the known leg; otherwise the inputs cannot describe a right triangle with positive side lengths. For a visual introduction and practice problems, see Khan Academy’s Pythagorean theorem lesson.
Tips for accurate results
The theorem applies only to right triangles. Identify the hypotenuse, which is the side opposite the right angle and always the longest, then enter the two known sides. To find a leg, subtract the squares instead of adding them.
Common mistakes and limits
Keep all measurements in the same unit before calculating, and round only at the end. A quick plausibility check is that the hypotenuse must be longer than either leg but shorter than their sum.
Learn more: The Pythagorean theorem in real life.