Pythagorean Theorem Calculator
0 is the missing side
The Pythagorean Theorem Formula
For any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c², where c is the hypotenuse (the longest side, always opposite the right angle) and a and b are the two legs. Given any two of the three sides, you can solve for the third: c = √(a² + b²) when the hypotenuse is missing, or a = √(c² - b²) when a leg is missing. This calculator only solves for a missing side of a right triangle — it does not verify that a triangle with three already-known sides actually contains a right angle.
A Common Mistake: Mixing Up the Hypotenuse
The most frequent error is subtracting in the wrong order when solving for a leg. Because the hypotenuse is always the largest side, c² must always be the value you subtract from, never the value you subtract. If your inputs would require taking the square root of a negative number, the leg you entered is actually larger than the hypotenuse you entered, and the triangle described is impossible.
Need Angles or Area for a Non-Right Triangle?
This tool is deliberately limited to the two-legs-and-a-hypotenuse relationship. If you need to solve a triangle that isn't a right triangle, or you also want the angles and area from any combination of sides and angles, use the full triangle calculator. For a right triangle where you want angles and area included alongside the sides, see the right triangle calculator.
Frequently Asked Questions
What is the Pythagorean theorem formula?
For any right triangle, a^2 + b^2 = c^2, where a and b are the two legs and c is the hypotenuse - the longest side, always located opposite the right angle. Knowing any two of the three sides lets you solve for the third.
Why does the calculator say my inputs are invalid?
When solving for a leg (a or b), the hypotenuse you enter must be larger than the known leg, since the hypotenuse is always the longest side of a right triangle. If the known leg is equal to or larger than the hypotenuse, no valid right triangle exists with those measurements, and the calculation would require the square root of a negative number.