Skip to calculator

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

Always a leg of the right angle, strictly positive, same unit as b.

Hypotenuse mode: the other leg. Leg mode: the hypotenuse (must be strictly longer than a).

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

  1. 3² + 4² = 9 + 16 = 25.
  2. √25 = 5.

Hypotenuse c = 5.

Missing leg of a 5-12-13

leg mode, a = 5, b = 13 (hypotenuse)

  1. 13² − 5² = 169 − 25 = 144.
  2. √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.

Methodology · Sources

Related calculations

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.

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 area

Category: Mathematics