Enter values
EducationPythagorean Theorem Calculator — How it works
This calculator helps you quickly find the unknown side of a right triangle. You can calculate the hypotenuse or one of the legs using the known values of the other sides.
Pythagorean theorem formula
The main formula is:
- a² + b² = c²
Here a and b are the legs, and c is the hypotenuse.
How to find the hypotenuse
If both legs are known, use the formula:
- c = √(a² + b²)
How to find a leg
If the hypotenuse and one leg are known:
- a = √(c² − b²)
- b = √(c² − a²)
Example
For a triangle with legs 3 and 4:
- c = √(3² + 4²) = √(9 + 16) = √25 = 5
What is important to check
The hypotenuse must always be longer than any leg. If it is not, the values do not describe a valid right triangle.
Frequently Asked Questions
What is the Pythagorean theorem?
It is the rule for a right triangle: the square of the hypotenuse equals the sum of the squares of the legs.
How do you find the hypotenuse?
Use the formula c = √(a² + b²).
How do you find a leg?
Use the formula a = √(c² − b²) or b = √(c² − a²).
For which triangles does this work?
Only for right triangles.
What if the hypotenuse is smaller than a leg?
Those values are invalid, so the calculator will show an error.
Are decimal numbers supported?
Yes, you can enter both whole and decimal values.