Pythagorean Theorem Calculator
Solve for any side of a right triangle using a² + b² = c² with step-by-step solutions.
a² + b² = c²
Updates as you typeYour triangle
Drawn to scaleFormula
- a, b
- Legs — the two sides that form the 90° angle
- c
- Hypotenuse — the side opposite the right angle (always the longest)
- Solve for c
- c = √(a² + b²)
- Solve for a
- a = √(c² − b²)
- Solve for b
- b = √(c² − a²)
- Enter any two sides to see the full solution.
- —
- —
- —
- —
The theorem only holds for right triangles — triangles with a 90° angle. Its converse is also true: if a² + b² = c² for three sides, the triangle is guaranteed to be right-angled.
Examples
How It Works
Enter any two of the three sides and leave one blank. The calculator automatically detects which side is missing and solves for it: if the hypotenuse c is missing, c = √(a² + b²); if a leg is missing, a = √(c² − b²).
Every result includes a step-by-step solution showing the substitution, computation, and square root, plus a verification that confirms a² + b² = c² holds true for the computed values.
Tips & Best Practices
Frequently Asked Questions
What if I enter all three sides?
The calculator will verify whether a² + b² = c² holds true and tell you if the values form a valid right triangle.
What if c is smaller than a or b?
The hypotenuse must be the longest side. If c ≤ a or c ≤ b, the triangle is invalid and an error is shown.
Can I use decimals?
Yes. The Pythagorean theorem works for any positive real numbers, not just integers.
What is a Pythagorean triple?
A Pythagorean triple is a set of three positive integers where a² + b² = c². The smallest is (3, 4, 5). There are infinitely many such triples.
Does the theorem work in 3D?
The theorem generalises: for a rectangular box with edges a, b, h, the longest space diagonal is d = √(a² + b² + h²). It is just the Pythagorean theorem applied twice.
What if I want to solve for just one side?
Pick the corresponding mode chip ("Solve for c / a / b") at the top. The chosen side becomes read-only and is filled in automatically as you change the other two.