Pythagorean Theorem Calculator
Missing side
Step-by-step solution
Calculate a valid result to generate the full working.
Pythagorean theorem formula explained
How the side labels work
Side a and side b are the legs. Side c is the hypotenuse, which is opposite the right angle and must be the longest side. The diagram highlights the missing side so the result card and triangle stay in sync.
The formula table below covers the two real jobs this page must handle: how to find the hypotenuse and how to find a missing leg.
| Use case | Formula | When to use it |
|---|---|---|
| Standard theorem | c^2 = a^2 + b^2 | Use when side c is the missing hypotenuse in a right triangle. |
| Hypotenuse form | c = sqrt(a^2 + b^2) | Square both legs, add them, then take sqrt(). |
| Solve for side a | a = sqrt(c^2 - b^2) | Use when the hypotenuse and side b are known. |
| Solve for side b | b = sqrt(c^2 - a^2) | Use when the hypotenuse and side a are known. |
Understanding the result
After you calculate a result, this section explains why the side length makes sense for a right triangle and whether it matches a familiar triple.
How to use the Pythagorean theorem calculator
- Choose which side is missing: hypotenuse c, side a, or side b.
- Enter the two known positive side lengths. The missing field is disabled on purpose so the solve target stays obvious.
- Press Calculate to show the final answer, formula used, inside-sqrt value, and step-by-step working.
- Use Example to load a valid right triangle instantly or Reset to clear the page.
Specify which side is missing first, then enter the two known values. The result includes the simplified answer, the inside-sqrt value, and a labeled SVG diagram.
What the Pythagorean theorem calculator gives you
Enter any two sides of a right triangle and the calculator returns the missing third side - including the intermediate radicand, whether the result is exact or approximate, and a labeled SVG diagram of the triangle.
Enter legs a and b to find the hypotenuse c. Enter the hypotenuse and one leg to find the missing leg. The calculator validates the input before solving - if a leg is longer than the hypotenuse you entered, it reports an impossible triangle instead of returning a wrong answer.
How the Pythagorean theorem works
The theorem says a^2 + b^2 = c^2. In plain language, that means the sum of the squares of the legs equals the square of the hypotenuse. Because c is opposite the right angle, it must be the longest side. This is why the page validates the relationship before showing a result and blocks impossible inputs such as a hypotenuse that is shorter than a leg.
The structure of the theorem also explains why square root appears in the final step. Squaring happens first so the side relationships can be compared on the same scale. After addition or subtraction, you take the square root to convert the squared value back into an actual side length.
How to find the hypotenuse
To find the hypotenuse, enter side a and side b, then apply c = sqrt(a^2 + b^2). The important detail is order of operations: square each leg first, add those squared values, and only then take the square root. Students often make the mistake of adding first and squaring later, which changes the meaning of the theorem completely.
This is why a good hypotenuse calculator should always show the value inside sqrt(). Seeing the intermediate radicand makes the calculation easier to check and teaches the logic instead of hiding it behind a black box.
How to find a missing leg
To find a missing leg, rearrange the theorem. If side a is missing, use a = sqrt(c^2 - b^2). If side b is missing, use b = sqrt(c^2 - a^2). The subtraction matters because you are removing the known leg square from the hypotenuse square.
This is the part of the workflow where validation matters most. If the known leg is longer than c, the value inside sqrt() becomes zero or negative, which means the triangle is impossible. The page checks that condition and surfaces a clear error instead of returning a broken answer.
Worked examples
Example 1 - find the hypotenuse
Given side a = 5 and side b = 12
Use c = sqrt(a^2 + b^2)
Final result: c = 13
Square the legs, add 25 + 144 = 169, then take sqrt(169) to get 13. This is the classic 5-12-13 Pythagorean triple.
Example 2 - find a missing leg
Given hypotenuse c = 13 and side b = 12
Use a = sqrt(c^2 - b^2)
Final result: a = 5
Square 13 and 12, subtract 169 - 144 = 25, then take sqrt(25) to get 5. This is the reverse-direction version of the same theorem.
Example 3 - solve the other leg
Given hypotenuse c = 10 and side a = 6
Use b = sqrt(c^2 - a^2)
Final result: b = 8
Square 10 and 6, subtract 100 - 36 = 64, and take sqrt(64) to get 8. This is useful practice because the missing side changes but the structure stays the same.
Common mistakes
Using the theorem on a non-right triangle
The Pythagorean theorem only works when one angle is exactly 90 degrees. If the triangle is not a right triangle, you need a different formula set such as the Law of Cosines.
Putting the hypotenuse in the wrong field
Users often know the longest side but type it into a or b out of habit. That changes the solve path and usually produces an impossible triangle. The calculator keeps c labeled clearly and disables the missing field to reduce that mistake.
Subtracting or adding in the wrong order
For hypotenuse problems, square then add. For missing-leg problems, square then subtract. Do not subtract first and square later. The step cards make that order explicit so the math is easier to audit.
Frequently Asked Questions
Quick tips for Pythagorean theorem problems
- Hypotenuse is always c - it is the side opposite the 90° angle and must be the longest side.
- Square first, then add or subtract - do not add the legs before squaring them.
- The exact answer is often a simplified radical (e.g., 5√2). The decimal is the approximation.
- This formula only works for right triangles. For other triangles use the Law of Cosines instead.
- Common right-triangle sets to know: 3-4-5, 5-12-13, 8-15-17, 7-24-25.