About the Pythagorean Theorem Calculator
The Pythagorean theorem is one of the first results in geometry that students use constantly: for ladders leaning on walls, diagonals of screens and rooms, distances on a coordinate grid, the length of a ramp or the shortest path across a park. Whenever a right angle appears, two known sides determine the third.
This calculator solves both versions of the problem. Give the two legs to find the hypotenuse, or give one leg and the hypotenuse to find the other leg. The square root is simplified exactly, so becomes and a whole-number answer is recognised as a Pythagorean triple. The steps show the squaring and adding, and the result also lists the area, perimeter and the two acute angles in degrees.
What is the Pythagorean theorem?
In a right triangle, the side opposite the right angle is the hypotenuse , and the two sides that form the right angle are the legs and . The Pythagorean theorem states that : the area of the square built on the hypotenuse equals the combined areas of the squares built on the legs.
The converse is also true and just as useful. If three lengths satisfy , the triangle they form has a right angle opposite . Builders use this with a 3-4-5 rope to set out square corners, and it is a quick way to test whether a triangle given by its sides is right-angled, acute () or obtuse ().
How to use the Pythagorean Theorem Calculator
- Choose whether you want the hypotenuse or a missing leg.
- To find the hypotenuse, enter legs and .
- To find a leg, enter the known leg and the hypotenuse , which must be the longer of the two.
- Press Solve triangle to see the squares, the sum or difference, and the square root.
- Read the exact length, its decimal value, and the area, perimeter and angles below it.
Formulas
Pythagorean theorem
Hypotenuse
Missing leg
Area of a right triangle
The two legs act as base and height because they are perpendicular.
Acute angle
Worked example: Legs 3 and 4
The worked example uses legs and . Squaring gives and , which add to , so . Because all three sides are whole numbers, is a Pythagorean triple.
The area is , the perimeter is , and the acute angles are and , which add with the right angle to .
The solution below is generated by the same engine that powers the calculator above.
Final answer
How we read your problem
Find the hypotenuse of a right triangle from its two legs.
Step-by-step solution
Write the Pythagorean theorem
The hypotenuse c is the side opposite the right angle and is always the longest side.
Substitute the legs and square them
Take the positive square root
Lengths are positive, so only the positive root is used.
Area and perimeter
Acute angles
Angle A is opposite leg a and angle B is opposite leg b; the right angle C is 90°.
Formulas used
Pythagorean theorem
Missing leg
Area
In every right triangle the square on the hypotenuse equals the sum of the squares on the two legs. Knowing any two sides fixes the third, and the angles follow from the tangent ratio.
Verification
- Check: a² + b² = 25 and c² = 25, which agree.
- (3, 4, 5) is a Pythagorean triple: all three sides are whole numbers.
- Angle sum: 90° + 36.869898° + 53.130102° = 180°.
Detailed explanation
Finding the hypotenuse
Square each leg, add the squares, and take the square root. For legs 1 and 1 the sum is 2, so the hypotenuse is , the diagonal of a unit square. For legs 2.5 and 6 the sum is , so the hypotenuse is exactly .
The hypotenuse is always longer than either leg but shorter than their sum. If your answer breaks either rule, a value has been squared or added incorrectly. A common slip is adding the legs first and then squaring, which gives instead of .
Finding a missing leg
Subtract the square of the known leg from the square of the hypotenuse, then take the square root. With leg 5 and hypotenuse 13, and the missing leg is , another well-known triple. With leg 7 and hypotenuse 10, , and since 51 has no square factor the answer stays as .
Subtraction is the step people most often get backwards. The hypotenuse is the longest side, so its square comes first. If the leg you enter is not shorter than the hypotenuse, the calculator stops and explains why, because no right triangle has a leg at least as long as its hypotenuse.
Simplified radicals and Pythagorean triples
When the answer is not a whole number, it is simplified by pulling square factors out of the root, for example , and a decimal approximation is shown alongside. Teachers often expect the exact radical, while practical measurements need the decimal, so both are provided.
Triples such as , , and appear in many exercises, and any multiple of a triple is also a triple, such as . Spotting one saves time, and the calculator flags it when all three sides come out as whole numbers.
Common mistakes
- Treating the longest side as a leg instead of the hypotenuse.
- Adding the legs before squaring rather than squaring each leg first.
- Adding the squares when looking for a leg; a missing leg needs .
- Using the theorem on a triangle that has no right angle; use the law of cosines instead.
- Rounding the hypotenuse early and then using the rounded value to compute angles or area.
Tips
- Sketch the triangle and mark the right angle before deciding which side is .
- Mixed units must be converted first, for example feet and inches both to inches.
- On a coordinate grid, the horizontal and vertical differences are the legs; this is exactly the distance formula.
- Learn the first few triples so you can check answers mentally.
- For three-dimensional diagonals, apply the theorem twice: for a box.
Frequently asked questions
How do you find the hypotenuse of a right triangle?
Square the two legs, add the results, and take the square root: c = √(a² + b²). For legs 6 and 8 that is √(36 + 64) = √100 = 10.
How do you find a missing leg with the Pythagorean theorem?
Subtract the square of the known leg from the square of the hypotenuse and take the square root: b = √(c² − a²). For example, with a = 8 and c = 17, b = √(289 − 64) = √225 = 15.
What is a Pythagorean triple?
A set of three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. Multiplying every number of a triple by the same whole number gives another triple, for example 9, 12, 15.
Does the Pythagorean theorem work for every triangle?
No. It holds only for right triangles. For other triangles use the law of cosines, c² = a² + b² − 2ab cos C, which reduces to the Pythagorean theorem when C is 90°.
How can I check whether a triangle is a right triangle?
Square the three sides and compare the largest square with the sum of the other two. If they are equal, the triangle has a right angle; if the largest square is smaller the triangle is acute, and if it is larger the triangle is obtuse.
Why is the answer shown as a square root?
When a² + b² is not a perfect square, the exact length is irrational. The calculator simplifies the radical, for example √50 = 5√2, and also shows a decimal so you can use whichever form your task needs.
How are the angles of the right triangle found?
The tangent of angle A equals the opposite leg over the adjacent leg, so A = arctan(a/b). The other acute angle is 90° minus A, because the three angles of any triangle add to 180°.
Solve your right triangle
Enter two sides above to get the third side exactly, together with the area, perimeter and both acute angles.