← All calculatorsGeometry & Trigonometry

Hypotenuse Calculator

Finds the hypotenuse from two legs and works the theorem backwards to recover a missing leg when the hypotenuse is known.

Hypotenuse from a, b
10
Missing leg from c, a
8

How to use the Hypotenuse Calculator

  1. Enter the two legs to compute the hypotenuse.
  2. To find a missing leg instead, enter the known leg as a and the hypotenuse in the third field.
  3. Read the hypotenuse from the first result row.
  4. Read the missing leg from the second row; it requires the hypotenuse to exceed the known leg.
  5. Check the result: the hypotenuse must always be the longest of the three sides.

How the calculation works

The hypotenuse calculation squares each leg, adds them and takes the square root. Internally the calculator uses the hypot routine rather than raw squaring, because squaring very large values can overflow and very small ones can underflow, and hypot rescales internally to avoid both. For everyday numbers the results are identical, but the safer path costs nothing.

Running the theorem backwards recovers a missing leg as the square root of the hypotenuse squared minus the known leg squared. This is the form that matters when you know a diagonal and one dimension — checking whether a room is square by measuring both diagonals, or finding the horizontal reach of a ladder from its length and the height it touches. The hypotenuse must exceed the known leg or the subtraction goes negative, which is the calculator's way of telling you the measurements are inconsistent.

Diagonal checking is the everyday application. In any rectangle the two diagonals are equal; if they differ, the shape is a parallelogram and something is out of square. On a 3 m by 4 m formwork frame, both diagonals should read exactly 5 m, and a 10 mm discrepancy across that span indicates roughly 4 mm of racking to correct before the pour.

Formula
c = √(a² + b²); missing leg b = √(c² − a²), requires c > a

Source: Pythagorean theorem; hypot implementation per IEEE 754 numerical practice.

Worked example

A 6 m ladder is placed against a wall with its base 1.8 m out. How high does it reach?

  1. Known hypotenuse c = 6 m (the ladder), known leg a = 1.8 m (the base offset).
  2. Square them: 36 and 3.24.
  3. Subtract: 36 − 3.24 = 32.76.
  4. Square root: √32.76 = 5.72 m.

5.72 m of reach — and the 1.8 m offset gives a 72.5° angle, close to the 75° that the standard 1:4 ladder rule recommends.

Frequently asked questions

Why does it say c must exceed a?+

Because the hypotenuse is always the longest side. If your entered hypotenuse is shorter than a leg, one of the two measurements is wrong.

What are Pythagorean triples?+

Integer side sets like 3-4-5, 5-12-13 and 8-15-17. They are handy for setting out because no decimals are involved.

Can I use this for a diagonal across a room?+

Yes for the floor diagonal. For a corner-to-opposite-corner line through the space, use the surface area calculator's space diagonal.

Does it work in three dimensions?+

Apply it twice: find the floor diagonal first, then treat that as a leg with the height as the other.

Last reviewed August 31, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.

Related

More in Geometry & Trigonometry