What is the Pythagorean Theorem?
The Pythagorean theorem describes the relationship between the three sides of a right triangle: the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides. Written algebraically, \(a^2 + b^2 = c^2\), where c is the hypotenuse and a and b are the legs. This calculator rearranges that equation so you can solve for whichever side is unknown.
How to use this calculator
First choose the side you want to find — the hypotenuse c, or one of the legs a or b. Then enter the two sides you already know and leave the unknown side blank. The calculator returns the missing length, and also reports the triangle's area and perimeter for convenience.
The formula explained
To find the hypotenuse, add the squares of both legs and take the square root: $$c = \sqrt{a^2 + b^2}$$ To find a missing leg, subtract the known leg's square from the hypotenuse's square: $$a = \sqrt{c^2 - b^2}$$ Because a leg must be shorter than the hypotenuse, the value under the root must be positive — otherwise no valid right triangle exists.
Worked example
Suppose a right triangle has legs of 3 and 4. The hypotenuse is $$c = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5.$$ This classic 3-4-5 triangle has an area of \(\frac{1}{2} \times 3 \times 4 = 6\) and a perimeter of \(3 + 4 + 5 = 12\).
FAQ
Which side is the hypotenuse? It is always the longest side and lies opposite the 90° angle.
Can I solve for a leg? Yes — select leg a or b, enter the hypotenuse and the other leg. The other leg must be smaller than the hypotenuse.
Does this only work for right triangles? Yes. The theorem is valid only for triangles containing a 90° angle. For other triangles use the law of cosines.