How to Solve a Right Triangle
Enter any two sides — leave the one you want to find blank — to see the missing side and the working.
1
Enter two known sides
Fill in any two of the three fields — leg a, leg b, or hypotenuse c — and leave the field you want to solve for blank.
2
The calculator applies a² + b² = c²
If the hypotenuse is blank, it computes c = √(a² + b²). If a leg is blank, it rearranges the formula to solve for that leg, for example a = √(c² - b²).
3
Read the result and steps
The missing side appears at the top, and each squaring, adding/subtracting, and square-root step is listed below it. Need the midpoint of a line segment instead? The Midpoint Calculator handles coordinate geometry.
Frequently Asked Questions
What is the Pythagorean theorem formula?
The Pythagorean theorem states that in a right triangle, a² + b² = c², where a and b are the two legs (the sides forming the right angle) and c is the hypotenuse (the longest side, opposite the right angle). Given any two of the three sides, you can solve for the third: c = √(a² + b²) to find the hypotenuse, or a = √(c² - b²) to find a missing leg. This calculator does the arithmetic and shows every step.
How do you find the hypotenuse using a squared plus b squared?
To find the hypotenuse, square both legs, add the results together, then take the square root: c = √(a² + b²). For example, with legs of 3 and 4, a² + b² = 9 + 16 = 25, and c = √25 = 5. This only works for a right triangle, since the theorem depends on the 90° angle between the two legs.
How do you find a missing leg instead of the hypotenuse?
Rearrange the formula to isolate the leg: a² = c² - b² (or b² = c² - a²), then take the square root of the result. For example, with a hypotenuse of 10 and a known leg of 6, the missing leg is √(10² - 6²) = √(100 - 36) = √64 = 8. The hypotenuse must always be longer than either leg, since it is the longest side of the triangle.
Why does this calculator say the inputs are invalid?
The Pythagorean theorem calculator needs exactly two of the three sides filled in, with the third left blank so it knows what to solve for. Filling all three, or only one, leaves it nothing to compute. It also rejects a hypotenuse that is less than or equal to a known leg, because the hypotenuse of a right triangle is always the longest side, so a leg of 3 with a hypotenuse of 3 describes no triangle. Every side must be a positive number, since a length of zero or below is not a side at all.