Solve a right triangle side from two known sides
Find the missing positive side of a right triangle when exactly two side lengths are known.
How to use this calculator
- Use the same length unit for all known sides. Enter exactly two positive side lengths and leave the unknown side blank.
- Label the longest side c, the hypotenuse. If c is known, it must exceed the known leg.
- Calculate, then read the exact length and its decimal approximation in your original unit.
Methodology and assumptions
For a right triangle a²+b²=c². An unknown hypotenuse is √(a²+b²); an unknown leg is √(c²−known-leg²). Positivity and the known hypotenuse check exclude zero-area and imaginary-length triangles.
Precision and rounding
Perfect rational square roots are returned exactly. Irrational roots retain an exact radical and a bounded approximation to 12 significant figures; small values may use scientific notation.
Worked example
With a=3 and b=4, c²=3²+4²=9+16=25, so c=5. Conversely, with c=13 and a=5, b=√(169−25)=√144=12. Substituting 5²+12²=169 checks the second result.
Reference examples are specification evidence only; they do not claim that this interface or calculation engine has been tested.
Interpreting the result
The result assumes a right triangle and positive lengths. It does not infer a third side when all values are entered or when more than one is unknown.
Right triangles only; no angle inference, automatic unit conversion or validation of three simultaneously entered sides. Negative and zero lengths are rejected. Decimal measurements do not acquire greater physical accuracy from an exact mathematical representation.
Common mistakes
- The hypotenuse must be the longest side.
- Enter exactly two side lengths.
- Do not enter zero or negative lengths as ordinary sides.
- A triangle that does not satisfy the right-triangle constraints has no valid missing leg.
Frequently asked questions
Which side is the hypotenuse?
It is the side opposite the right angle and must exceed either leg.
Can I solve when both legs are missing?
No. Exactly two side lengths must be known.
Why can an input combination be invalid?
The squared missing-leg result may be zero or negative, which cannot give a positive length.
Are units converted?
No. Use consistent units for the known sides.
Can the displayed decimal be approximate?
Irrational square roots require a rounded display; the model preserves the underlying calculation precision.
Can I use different units for the two known lengths?
Not without converting them first. The calculator assumes one common unit and returns that same unit.
Sources and further reading
These references support the documented method or context. They do not imply application testing or endorsement.