How to Find the Hypotenuse
The Pythagorean theorem says that in a right triangle the square of the longest side equals the sum of the squares of the other two: a² + b² = c². The longest side, c, is the hypotenuse, and it always sits opposite the right angle. The other two sides, a and b, are the legs. To find the hypotenuse, square both legs, add the squares, and take the square root of the total.
Take the classic 3-4-5 triangle. The legs are 3 and 4, so a² + b² = 9 + 16 = 25, and the hypotenuse is the square root of 25, which is 5. This calculator does the same steps for any pair of legs and shows each one, so you can check your own working against it. The area of that triangle is 6 and its perimeter is 12.
Many answers are not whole numbers. With legs 2 and 5 the sum of squares is 29, which is not a perfect square, so the hypotenuse is √29, or about 5.38516480713. The calculator keeps the exact radical and also gives the decimal, so you can use whichever your teacher, plan or spreadsheet needs. Rounding only at the very end avoids small errors building up across several steps.
How to Find a Missing Leg
When the hypotenuse and one leg are known, rearrange the same equation: b² = c² − a². Subtract the square of the known leg from the square of the hypotenuse, then take the square root. Because the hypotenuse is the longest side, c must be larger than the known leg; if it is not, no right triangle exists and the calculator tells you so instead of returning a meaningless number.
Worked example: the hypotenuse is 13 and one leg is 5. Then b² = 169 − 25 = 144, so the missing leg is 12. Another whole-number case is a leg of 7 with a hypotenuse of 25, which gives 24. A leg of 3 with a hypotenuse of 5 returns 4, the other half of the 3-4-5 triangle. If the numbers do not come out even, such as a leg of 2 and a hypotenuse of 4, the answer is the radical 2√3, about 3.46410161514.
Radical Answers and Exact Values
A square root that is not a whole number is called a radical. The calculator simplifies radicals by pulling out perfect squares, so the square root of 12 is written 2√3 rather than left unsimplified. The simplest case is a right triangle with two equal legs of 1: the hypotenuse is √2, about 1.41421356237. That number is the diagonal of a unit square, and it is the oldest known example of an irrational length, meaning it cannot be written as a fraction of whole numbers.
You can type a leg as a radical too. Entering √2 or sqrt(2) for a side keeps the arithmetic exact, so squaring it gives exactly 2 with no rounding. That is useful in geometry homework, where the expected answer is the radical form, and in design work, where you want to know the exact value before choosing how many decimals to keep.
How to Identify the Hypotenuse
Mixing up the hypotenuse with a leg is the most common mistake. Three checks help. First, the hypotenuse is opposite the right angle, the square corner. Second, it is the longest side, so if you already know all three lengths, the largest one is c. Third, only the hypotenuse is squared on the left-hand side of the rearranged equation when you solve for a leg: c² − a² = b². Sketching the triangle and marking the right angle before you start prevents nearly every slip.
The converse also holds and is a handy test. If three lengths satisfy a² + b² = c², the triangle is a right triangle. Carpenters use this with the 3-4-5 rule: measure 3 along one edge and 4 along the other, and the diagonal between those marks should be 5 when the corner is square. Scaling keeps the rule valid, so 6-8-10 works as well; the calculator gives 10 for legs of 6 and 8.
Where the Theorem Is Used
The theorem turns up wherever a straight-line distance is needed. In construction it checks that corners are square and finds rafter and ladder lengths. In navigation and mapping it gives the distance between two points on a grid, and the distance formula in coordinate geometry is the theorem applied to the horizontal and vertical differences. It also underlies the length of a diagonal on a screen or a room, the size of a ramp, and many problems in physics where perpendicular components combine into one magnitude.
All lengths must be in the same unit before you start. If one leg is in feet and the other in inches, convert first, otherwise the squares are not comparable and the answer is wrong.
Frequently asked questions
What is the Pythagorean theorem formula?
It is a² + b² = c², where a and b are the two legs of a right triangle and c is the hypotenuse. To find c, take the square root of a² + b². To find a leg, take the square root of c² minus the square of the other leg.
Does the theorem work for any triangle?
No. It applies only to right triangles, which have one 90-degree angle. For other triangles you need the law of cosines, which reduces to the Pythagorean theorem when the angle is 90 degrees.
Why does the calculator reject my hypotenuse?
The hypotenuse is the longest side, so it must be larger than the known leg. If c is equal to or smaller than the leg, c² − a² is zero or negative and no real triangle fits those numbers. Check which side is the hypotenuse and re-enter the values.
Can I enter a square root such as √2?
Yes. You can type √2, sqrt(2) or an expression like 3√5 for a side, and the result stays exact. Decimals work as well, up to four decimal places.
What are Pythagorean triples?
They are sets of three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Multiplying a triple by any whole number gives another one, so 6-8-10 and 9-12-15 also work.
Related tools: the slope calculator finds the distance between two points, the square footage calculator measures area, and the math directory lists every free math tool on the site.