Shapes & spaces

Pythagorean theorem calculator

Solve a missing hypotenuse or either missing leg of a right triangle, with the squared relationship explained.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Try it, understand it

Explore the result

Rearrange the same right-triangle relation for each possible missing side.

Worked example comparison
ExampleOutputWhat to notice
Find c from two legsHypotenuse5 unitsLegs three and four give hypotenuse five.
Find leg aMissing leg a3 unitsHypotenuse five and leg b four give leg a three.
Find leg bMissing leg b4 unitsHypotenuse five and leg a three give leg b four.

Check your understanding

Is the hypotenuse identified by its letter alone?

It must actually be opposite the right angle.

Does a zero side form a nondegenerate triangle?

No. It is a mathematical boundary case.

Behind the numbers

How this calculation works

Identify the hypotenuse opposite the right angle before choosing the unknown side. Add squared legs when finding that hypotenuse; subtract a known squared leg from the squared hypotenuse when finding the other leg. A hypotenuse smaller than its known leg is invalid.

THE FORMULAc = √(a²+b²); a = √(c²−b²); b = √(c²−a²)

A worked example

A right triangle with perpendicular sides 3 and 4 has a hypotenuse of 5.

Good to know

Right triangles only. Zero sides are reported as degenerate mathematical cases, not valid nondegenerate triangles. All known lengths must use the same unit. This does not solve arbitrary triangles or verify an unmeasured right angle.

Choose the hypotenuse before choosing the formula

The hypotenuse is opposite the right angle. When it is unknown, add the two squared leg lengths before taking the square root. When a leg is unknown, subtract the known leg’s square from the hypotenuse square instead.

A three–four–five triangle demonstrates all three modes. Legs three and four give hypotenuse five; hypotenuse five and leg four give the other leg three; hypotenuse five and leg three give the other leg four. The same relationship is being rearranged, not replaced by three unrelated formulas.

For two coordinate points, Cartesian distance uses the same right-triangle relationship on the horizontal and vertical differences.

A right-angle assumption is part of the input

The relation a²+b²=c² is not a formula for the third side of an arbitrary triangle. If a known hypotenuse is smaller than a known leg, the requested right triangle cannot be formed and the tool rejects the input instead of taking the square root of a negative value.

A zero computed leg is a degenerate mathematical boundary, not a usable triangular region. The triangle area calculator uses a specified perpendicular height and base; its model likewise depends on identifying a right-angle measurement rather than substituting any convenient sloping side.

A few questions, answered

Can I solve a missing leg?

Yes. Choose which leg is unknown and enter the hypotenuse plus the other leg.

Why is my smaller hypotenuse rejected?

The hypotenuse cannot be shorter than a leg of the intended right triangle.

Does entering two lengths establish a right angle?

No. The right-angle assumption must come from the problem or measurement.

Find your calculator

Start typing to explore the library.