How it works
In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. That single relationship rearranges three ways depending on which side is missing.
c = √(a² + b²) — finding the hypotenuse
a = √(c² − b²) — finding a leg
b = √(c² − a²) — finding the other leg
When solving for a leg, the hypotenuse must be the longest side. Enter a leg longer than c and the value under the square root goes negative — no such triangle exists, so the calculator says so rather than returning a meaningless number.
Worked example
A 3–4–5 triangle, the smallest whole-number right triangle.
- Square each known leg: 3² = 9 and 4² = 16.
- Add them: 9 + 16 = 25.
- Take the square root: √25 = 5.
The hypotenuse is 5.
Common questions
Does this work for any triangle?
No — only right triangles, meaning one angle is exactly 90°. For other triangles you need the law of cosines, which generalises this relationship by adding a term for the angle between the two known sides.
Which side is the hypotenuse?
The one opposite the right angle, and always the longest of the three. If you are unsure which of your measurements it is, it is the longest one.
What is a Pythagorean triple?
Three whole numbers that satisfy the relationship exactly — 3–4–5, 5–12–13 and 8–15–17 are the common ones. Any multiple of a triple is also a triple, so 6–8–10 works as well.