Pythagorean Theorem Calculator

Solve any right triangle: enter two sides — either both legs or a leg and the hypotenuse — and leave the third blank to find it, with every a² + b² = c² step shown.

a = 3 b = 4 c = 5
Missing side

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?
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?
This calculator needs exactly two of the three sides filled in and the third left blank so it knows what to solve for. It also rejects a hypotenuse that is less than or equal to the known leg, since the hypotenuse of a right triangle is always the longest side — a triangle with those measurements cannot exist.