Pythagorean Theorem Calculator

Find the hypotenuse or a leg in a right triangle using the formula a² + b² = c², with step-by-step explanation and visualization.

Enter values

Education
c = √(a² + b²)
Examples

Result

CalcCore
Enter values and click “Calculate”.

Pythagorean 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:

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:

How to find a leg

If the hypotenuse and one leg are known:

Example

For a triangle with legs 3 and 4:

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.