Mathematics · Geometry
Find a hypotenuse or missing leg
Two modes: √(a² + b²) for the hypotenuse, or √(c² − a²) for the missing leg. The triangle must be right-angled; a “leg” longer than the hypotenuse is rejected.
Calculate
How the calculator works
In hypotenuse mode, a and b are the legs; c = √(a² + b²). In leg mode, a is one leg and b is read as the hypotenuse c; the other leg is √(c² − a²). Zero is refused. If the typed hypotenuse is not strictly longer than a, the triangle is impossible.
Formula and method
a² + b² = c²
Elements Book I: in a right triangle, the square on the hypotenuse equals the sum of the squares on the other two sides. Here we solve for lengths, not drawn squares.
c = √(a² + b²) and b = √(c² − a²)
3 and 4 give c = 5. With a = 5 and c = 13, the missing leg is 12.
Lengths are strictly positive reals in one unit (ft, m, px…). Units are not converted. Plane Euclidean geometry only. Area is not computed here (ab/2 if a and b are perpendicular): see triangle area.
Worked example
3-4-5 hypotenuse
hypotenuse mode, a = 3, b = 4
- 3² + 4² = 9 + 16 = 25.
- √25 = 5.
Hypotenuse c = 5.
Missing leg of a 5-12-13
leg mode, a = 5, b = 13 (hypotenuse)
- 13² − 5² = 169 − 25 = 144.
- √144 = 12.
Missing leg = 12 (hypotenuse 13).
Input notes
- What you need
- Hypotenuse: both fields are legs. Leg: a is a leg, b is the hypotenuse.
- Side a
- A leg in both modes. Must be shorter than the hypotenuse in leg mode.
- Side b
- Other leg, or the hypotenuse, depending on the mode.
Assumptions and limits
Assumptions
- The triangle is right-angled at the vertex between the two legs.
- One shared length unit.
Limits
- Oblique triangles are out of scope (use SAS/Heron on the area page, which still needs a right angle for this identity).
- No spherical excess, no 3-D space diagonals beyond one right triangle.
How to read the result
5 is the longest side of a 3-4-5 triangle. Scaling 3-4-5 by 10 gives 30-40-50 with the same shape. If you only needed √25, the square-root page is enough; this page packages the theorem and the impossible-triangle check.
Common mistakes
Putting the hypotenuse in field a in hypotenuse mode.
In hypotenuse mode both fields are legs. Put the long side in b only in leg mode.
Using a² + b² = c² on a triangle that is not right-angled.
The identity fails if the right angle is missing. Check with a square or a 3-4-5 known pair.
Related calculations
- Triangle areaPick the data you have: a base and its perpendicular height, three side lengths, or two sides and the included angle. A collapsed (zero-area) triangle is rejected.
- Circle areaOne length is enough: the radius, or the diameter (halved). You get area πr², circumference 2πr, and both r and d as a check.
- Square rootEnter a number that is not negative. The tool returns the principal (nonnegative) square root. It is the inverse of squaring, not a cube root or an nth root.
Frequently asked questions
Does 3-4-5 work in feet and in meters?
Yes, as long as both legs use the same unit.
The theorem is homogeneous. 3 ft and 4 ft give 5 ft. Mixing 3 ft and 4 m is meaningless here; convert first with the length converter.
What if I only know two sides that are not a leg and hypotenuse pair?
This tool needs either two legs or a leg plus hypotenuse.
Two hypotenuses is impossible. Two non-right sides of a non-right triangle need a different law (not implemented here).
Can I find area here?
Not on this page. For two perpendicular legs, area is ab/2.
The triangle-area calculator has a base–height mode for that, plus Heron and SAS.
Author and update
Written by Rédaction HexaCalc (editorial team). Content last updated: August 25, 2026. No third-party medical or financial review is claimed.
- Les Éléments, Livre I (théorème de Pythagore) et Livre VII (algorithme d’Euclide) — Tradition mathématique euclidienne
Area of a triangle
If you have three sides or two sides and the included angle, area is a different formula from Pythagoras.
Calculate triangle areaCategory: Mathematics