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.
c = √(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.