Pythagorean Theorem Calculator
- The hypotenuse squared is the sum of the squares of the legs: 3^2 + 4^2 = 25.00.
- Take the square root: the square root of 25.00 is 5.00.
- The triangle's area is half the product of the legs: 3 x 4 / 2 = 6.00.
This Pythagorean theorem calculator finds the missing side of a right triangle from the two sides you already know. Enter the legs, and it returns the hypotenuse: legs of 3 and 4 give a hypotenuse of 5.00, with a hypotenuse squared of 25.00 and a triangle area of 6.00. Legs of 5 and 12 give a hypotenuse of 13.00 and an area of 30.00. You can also work in the other direction. A hypotenuse of 13 with a leg of 5 leaves a leg of 12.00, because the theorem rearranges to leg squared equals hypotenuse squared minus the known leg squared. The tool also reports the squared values and the area, so you can check each step rather than just copy a final number.
The method behind those results is the Pythagorean theorem itself: in a right triangle, the square on the hypotenuse equals the sum of the squares on the other two sides, written a squared plus b squared equals c squared. That relationship is the accepted standard for right-triangle side calculations, and it carries its own built-in check, since the hypotenuse is always the longest side, so a leg can never be longer than it. This page shows the formula, the step-by-step workings, worked examples such as the 3-4-5 and 5-12-13 triangles, and the sources behind the method, so you can follow the arithmetic and confirm the answer yourself.
Worked examples
The 3-4-5 triangle
Legs of 3 and 4 give a hypotenuse of 5.00, with a hypotenuse squared of 25.00. (3 · 4 · The hypotenuse)
| Missing side | 5.00 |
| Square on the hypotenuse | 25.00 |
| Triangle area | 6.00 |
The 5-12-13 triangle
Legs of 5 and 12 give a hypotenuse of 13.00 and an area of 30.00. (5 · 12 · The hypotenuse)
| Missing side | 13.00 |
| Square on the hypotenuse | 169.00 |
| Triangle area | 30.00 |
Find a leg
A hypotenuse of 13 with a leg of 5 leaves a leg of 12.00. (13 · 5 · A leg (side A is the hypotenuse))
| Missing side | 12.00 |
| Square on the missing leg | 144.00 |
| Triangle area | 30.00 |
What the theorem says
The Pythagorean theorem describes how the three sides of a right triangle relate to one another. A right triangle is any triangle with one 90-degree angle, and the theorem states that the square on the hypotenuse equals the sum of the squares on the other two sides. Written as a formula, that is a squared plus b squared equals c squared. The two shorter sides, called legs, are a and b, and the hypotenuse is c. If you build an actual square on each side of the triangle, the area of the largest square matches the combined area of the two smaller squares. That is the whole idea behind every pythagorean theorem calculator: you supply the sides you know, and the squared relationship fills in the rest.
The hypotenuse is the side opposite the right angle, which is why it holds the special place in the formula. The two legs meet at the 90-degree corner, so the hypotenuse never touches that angle. Because it sits across from the widest angle in the triangle, the hypotenuse is always the longest side of a right triangle, so a leg can never be longer than it. That single fact is a useful check on any answer: if your result for the hypotenuse comes out shorter than one of the legs, something has gone wrong.
A simple example shows how the numbers behave. Take legs of 3 and 4. Squaring each gives 9 and 16, and adding them gives 25. The square root of 25 is 5, so the hypotenuse is 5.00, with a hypotenuse squared of 25.00 and a triangle area of 6.00. A larger example works the same way: legs of 5 and 12 give a hypotenuse of 13.00 and an area of 30.00. Notice that the numbers can stay whole, but the method does not depend on that. The squaring step is what ties the three sides together, and it works for any right triangle, whatever the size.
The theorem also runs in reverse, which is often more useful in practice. If you know the hypotenuse and one leg, you can find the other leg by rearranging the formula: leg squared equals hypotenuse squared minus known leg squared. For instance, a hypotenuse of 13 with a leg of 5 leaves a leg of 12.00. This is the same relationship, just solved for a different unknown, and it is why a good calculator can handle any combination of sides you provide.
- The formula: a squared plus b squared equals c squared, where c is the hypotenuse.
- The hypotenuse is the side opposite the right angle and is always the longest side.
- Legs of 3 and 4 give a hypotenuse of 5.00, a hypotenuse squared of 25.00, and an area of 6.00.
- Legs of 5 and 12 give a hypotenuse of 13.00 and an area of 30.00.
- Rearranged to find a missing leg: leg squared equals hypotenuse squared minus known leg squared. A hypotenuse of 13 with a leg of 5 leaves a leg of 12.00.
Finding the hypotenuse
To find the hypotenuse with a pythagorean theorem calculator, you work with the side opposite the right angle. In a right triangle the square on the hypotenuse equals the sum of the squares on the other two sides: a squared plus b squared equals c squared, where a and b are the legs and c is the hypotenuse. The procedure is three steps: square each leg, add the two squares, then take the square root of that sum. The result is the length of the hypotenuse.
The classic 3-4-5 triangle shows the steps in action. Square the legs of 3 and 4 to get 9 and 16. Add them to get 25, which is the hypotenuse squared. The square root of 25 is 5, so legs of 3 and 4 give a hypotenuse of 5.00. The same triangle has an area of 6.00, found from the two legs. Because the numbers come out whole, 3-4-5 is a common example for checking that a calculator is working as expected.
The 5-12-13 triangle is the next well-known case. Square the legs of 5 and 12 to get 25 and 144, add them to get 169, and take the square root to get 13. Legs of 5 and 12 therefore give a hypotenuse of 13.00 and an area of 30.00. Both examples follow the same three steps; only the arithmetic changes. When the legs are not a neat pair, the square root will usually be a decimal, and the calculator rounds it for display.
The theorem also runs in reverse, which is useful when the hypotenuse is known and one leg is missing. Rearranged, leg squared equals hypotenuse squared minus known leg squared. A hypotenuse of 13 with a leg of 5 leaves a leg of 12.00: subtract 25 from 169 to get 144, then take the square root. One check on any answer: the hypotenuse is always the longest side of a right triangle, so a leg can never be longer than it. If a result for a leg comes out longer than the hypotenuse, the inputs or the arithmetic need a second look.
- Square each leg: 3 squared is 9 and 4 squared is 16.
- Add the squares: 9 plus 16 equals 25, the hypotenuse squared.
- Take the square root: the square root of 25 is 5, so the hypotenuse is 5.00.
- Repeat with 5 and 12: 25 plus 144 equals 169, and the square root of 169 is 13.00.
- To find a missing leg, subtract the known leg squared from the hypotenuse squared, then take the square root.
Finding a leg
Not every right-triangle question hands you the two legs and asks for the hypotenuse. Often you know the hypotenuse and one leg, and the missing piece is the other leg. The same relationship still applies, just rearranged. Since a squared plus b squared equals c squared, you can isolate the unknown leg by subtracting the square of the known leg from the square of the hypotenuse. In words: leg squared equals hypotenuse squared minus known leg squared. A pythagorean theorem calculator does this subtraction and square root for you, but the logic is simple enough to follow by hand.
Take the familiar case where the legs are 5 and 12 and the hypotenuse is 13.00, with an area of 30.00. Suppose instead you are told only that the hypotenuse is 13 and one leg is 5. Square the hypotenuse: 13 squared is 169. Square the known leg: 5 squared is 25. Subtract: 169 minus 25 leaves 144. The unknown leg is the square root of 144, which is 12.00. That matches the triangle you already know, which is a good check that the rearrangement is correct.
The same steps work for any right triangle, and the order of the legs does not matter. You can call the known leg a and the unknown leg b, or swap the labels; the subtraction comes out the same. What matters is that the hypotenuse is the value being squared first, because it is the largest side. The result should always come out smaller than the hypotenuse, and if it does not, something in the setup is wrong.
One useful sanity check comes from the shape of a right triangle: the hypotenuse is always the longest side, so a leg can never be longer than it. After you compute a missing leg, compare it with the hypotenuse you were given. If the leg comes out equal to or greater than the hypotenuse, recheck which number you treated as the hypotenuse. Also remember that a squared length cannot be negative, so if subtracting the known leg's square from the hypotenuse's square gives a negative result, the numbers cannot describe a real right triangle.
Working a second example confirms the pattern. With legs of 3 and 4, the hypotenuse is 5.00, the hypotenuse squared is 25.00, and the area is 6.00. If you knew only the hypotenuse of 5.00 and a leg of 3, you would square 5.00 to get 25.00, square 3 to get 9, subtract to get 16, and take the square root to find the other leg is 4.00. The rearrangement holds every time: square the hypotenuse, subtract the square of the known leg, then take the square root of what remains.
Where it is used
The Pythagorean theorem shows up wherever a right triangle hides inside a real problem. On a grid or a map, a straight-line distance between two points is the hypotenuse of a right triangle whose legs are the horizontal and vertical gaps between them. That is the same idea behind the distance formula in coordinate geometry: the change in x and the change in y act as the two legs, and the distance between the points is the hypotenuse. A pythagorean theorem calculator turns those measurements into a single answer without you having to square and unsquare by hand.
Ladder and ramp problems follow the same pattern. A ladder leaning against a wall, a ramp rising to a doorway, or a diagonal brace across a frame each forms a right triangle, with the ladder, ramp, or brace as the hypotenuse. Because the hypotenuse is always the longest side of a right triangle, a leg can never be longer than it. That single fact is a useful check: if a calculation gives a leg longer than the hypotenuse, something has been entered wrong.
Construction and layout work rely on the theorem through the 3-4-5 triangle. Legs of 3 and 4 give a hypotenuse of 5.00, with a hypotenuse squared of 25.00 and a triangle area of 6.00. Builders use those proportions to check that a corner is square, since a triangle with those side lengths must contain a right angle. Larger multiples of the same ratio work the same way, and the numbers stay easy to measure and mark.
The theorem also runs in reverse when you know the hypotenuse. A hypotenuse of 13 with a leg of 5 leaves a leg of 12.00, using the rearranged form in which the leg squared equals the hypotenuse squared minus the known leg squared. Legs of 5 and 12 give a hypotenuse of 13.00 and an area of 30.00, so the same triangle can be solved from either direction. This is how the tool handles problems where the missing side is not the longest one.
In every case the underlying rule is unchanged: in a right triangle the square on the hypotenuse equals the sum of the squares on the other two sides, written as a squared plus b squared equals c squared. The calculator simply applies that rule to the numbers you provide and reports the missing side, along with related values such as the squared hypotenuse and the triangle's area.
- Grids and maps: the straight-line distance between two points is the hypotenuse of a right triangle formed by the horizontal and vertical gaps.
- Coordinate geometry: the distance formula uses the change in x and the change in y as the two legs.
- Ladders and ramps: the ladder, ramp, or diagonal brace is the hypotenuse, and a leg can never be longer than it.
- Squaring corners: legs of 3 and 4 give a hypotenuse of 5.00, with a hypotenuse squared of 25.00 and an area of 6.00.
- Finding a missing leg: a hypotenuse of 13 with a leg of 5 leaves a leg of 12.00.
FAQs
What is the Pythagorean theorem?
The Pythagorean theorem describes the relationship between the three sides of a right triangle. It states that a squared plus b squared equals c squared, where c is the hypotenuse — the longest side, opposite the right angle. The other two sides, a and b, are called the legs. The theorem applies only when one angle is exactly 90 degrees.
How do you find the hypotenuse?
Square each of the two legs, add the results, and take the square root of that sum. For example, 3 squared plus 4 squared is 25, whose square root is 5.00. So a right triangle with legs of 3 and 4 has a hypotenuse of 5.00. The hypotenuse is always the longest side of a right triangle.
How do you find a missing leg?
Subtract the known leg squared from the hypotenuse squared, then take the square root of what remains. For example, 13 squared minus 5 squared is 144, whose square root is 12.00. So if the hypotenuse is 13 and one leg is 5, the missing leg is 12.00. Rearranging the formula this way works for either leg.
What is a 3-4-5 triangle?
A 3-4-5 triangle is a right triangle with sides of 3, 4 and 5. It is the smallest integer example of the Pythagorean theorem, since 3 squared plus 4 squared equals 5 squared. Builders use it to check square corners on building sites: measure 3, 4 and 5 along the sides and the diagonal, and the corner is square.
Does the theorem work for any triangle?
No — the Pythagorean theorem works only for right triangles. For other triangles, the law of cosines is the generalization. It adjusts the relationship to account for triangles that do not contain a 90-degree angle, so you cannot apply a squared plus b squared equals c squared to just any triangle you encounter.
How do you find the area of a right triangle?
Multiply the two legs and divide by two — that is, half the product of the two legs. For example, with legs of 3 and 4, the area is 3 times 4 divided by 2, which equals 6.00. The legs meet at the right angle, so one leg serves as the base and the other as the height.