Free tool · Math and study
Pythagorean theorem calculator
Find the hypotenuse or a missing leg of a right triangle, with the steps and an exact radical.
- Free
- No sign-up
- Runs in your browser
c = 5The square root of 25, exactly.
- Finding the hypotenuse c
- Right triangle
- Whole-number triple 3, 4, 5 (primitive)
- Area
- 6
- Perimeter
- 12
- Acute angles
- 36.87° and 53.13°
Formula: a² + b² = c² (a and b are the legs, c is the hypotenuse), so c = √(a² + b²)
Steps
- Square the two legs: a² = 3² = 9 and b² = 4² = 16.
- Add them to get c²: 9 + 16 = 25.
- Take the square root: c = √25 = 5.
How to use the Pythagorean Theorem Calculator
- Type the two sides you know into Leg a, Leg b and Hypotenuse c, and leave the side you want empty.
- Pick a Unit if you want one shown on the answer.
- Read the missing side under Result, as an exact value such as 5√2 and as a decimal, with the area, perimeter and angles.
- Fill in all three sides instead to check whether they form a right triangle, an acute one, an obtuse one, or no triangle at all.
How do I find the hypotenuse or a missing leg?
In a right triangle the two sides that meet at the right angle are the legs, a and b. The longest side, opposite the right angle, is the hypotenuse c. The theorem says a² + b² = c². To find the hypotenuse, square both legs, add them and take the square root: with legs 3 and 4, 9 + 16 = 25 and c = √25 = 5. To find a leg, subtract instead: a = √(c² − b²). With c = 13 and b = 12, 169 − 144 = 25 and a = 5.
When the root is not a whole number the tool gives the exact form first. Legs of 5 and 5 give c² = 50, and since 50 = 25 × 2 the answer is c = 5√2, which is about 7.0711. Decimal inputs are handled exactly too, so legs of 1.5 and 2 give exactly 2.5.
The tool refuses numbers that cannot make a right triangle. The hypotenuse is always the longest side, so if you give a leg of 4 and a hypotenuse of 3, there is no answer and the message says why. Equal values would make the missing leg zero, which is not a triangle either.
What are common Pythagorean triples, and does the theorem work for any triangle?
A Pythagorean triple is three whole numbers that satisfy a² + b² = c². The best known are 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29, and any multiple of a triple is another one, so 6-8-10 and 9-12-15 are scaled copies of 3-4-5. When your answer comes out as a whole number, the tool shows the triple as a chip and says if it is primitive, meaning the three numbers share no common factor.
The theorem is only true for right triangles. For other triangles the law of cosines adds a correction. You can still use a² + b² against c² as a test: if you enter all three sides, the tool compares the two shorter squares with the longest square. If they are equal the triangle is right-angled, if the sum is bigger the triangle is acute, and if it is smaller the triangle is obtuse. Sides such as 1, 2 and 4 are reported as no triangle, because the two shorter sides must add up to more than the longest.
How do I check a right angle when building something?
Builders use the 3-4-5 rule. Measure 3 units along one edge from the corner and 4 units along the other, then measure the straight line between the two marks. If it is exactly 5 units, the corner is square. Larger multiples are more precise: 6-8-10, 9-12-15 or 1.5 m, 2 m and 2.5 m. Enter your three measurements in the tool to see at once whether they make a right angle, or how far off they are.
Use the same unit for all sides and measure carefully, because a small error in a short side changes the result. The area, perimeter and the two acute angles are shown under the answer, for example 36.87° and 53.13° for the 3-4-5 triangle.
Use it with
- Square Root Calculator: roots and exponents.
- Fraction Calculator: add, subtract, multiply, divide fractions with steps.
- Final Grade Calculator: score needed on the final exam.
Questions
How do I find the hypotenuse?
Square both legs, add them and take the square root: c = √(a² + b²). With legs 3 and 4 the hypotenuse is √25 = 5.
How do I find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse and take the root: a = √(c² − b²). With c = 13 and b = 12 you get a = 5.
What are common Pythagorean triples?
Whole numbers that fit a² + b² = c²: 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29, and any multiple of them such as 6-8-10.
Does the Pythagorean theorem work for any triangle?
No, only for right triangles. For other triangles, a² + b² is bigger than c² when the angle opposite c is acute and smaller when it is obtuse. The law of cosines gives the exact relation.
How do I check a right angle when building?
Measure 3 along one edge and 4 along the other from the corner. If the distance between the marks is 5, the corner is square. Multiples like 6-8-10 work too.
How this page was made: the tool's results are computed in your browser by the code on this page; the explanations were drafted with AI help and checked against the tool's own output.