Pythagorean Theorem Solver
Solve any right triangle with the Pythagorean theorem. Enter two sides and get the third side instantly, with full step-by-step working and triple detection.
Input
Result
Enter a value for solve for to see your result.
How it works
Solves a right triangle with the Pythagorean theorem (a² + b² = c²). Enter two known sides and the tool computes the third, with the full step-by-step working shown.
Formula
a² + b² = c²
- a
- Length of one leg of the right triangle
- b
- Length of the other leg
- c
- Length of the hypotenuse (opposite the right angle)
Step by step
- 01Decide which side you need to solve for: the hypotenuse c, or one of the legs.
- 02If you are solving for the hypotenuse: c = √(a² + b²).
- 03If you are solving for a leg: rearrange to leg = √(c² − a²); the hypotenuse must be longer than the known leg.
- 04Square the known sides, add or subtract per the rearranged formula, then take the square root.
- 05If the inputs form a known integer triple (3-4-5, 5-12-13, 8-15-17, …) the tool flags it as a Pythagorean triple.
Examples
3-4-5 triangle
c = √(3² + 4²) = √(9 + 16) = √25 = 5. The classic 3-4-5 right triangle.
Inputs
- Solve for:
- hypotenuse
- Leg a:
- 3
- Leg b:
- 4
Result
- Missing side:
- 5
Solve for a leg (13² − 5² → 12)
leg = √(13² − 5²) = √(169 − 25) = √144 = 12. The 5-12-13 Pythagorean triple.
Inputs
- Solve for:
- leg
- Leg a:
- 5
- Hypotenuse c:
- 13
Result
- Missing side:
- 12
Frequently asked questions
What is the Pythagorean theorem?
In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². It only applies when one angle is exactly 90°.
How do I solve for a leg instead of the hypotenuse?
Rearrange the formula: a = √(c² − b²). The hypotenuse must be longer than the leg you already know, otherwise the square root is of a negative number and there is no real solution.
What is a Pythagorean triple?
A set of three positive integers (a, b, c) that satisfy a² + b² = c². Common triples are 3-4-5, 5-12-13, 8-15-17, and 7-24-25. The tool flags inputs that form one.