Similar Right Triangles Calculator

Enter a right triangle's two legs to find the hypotenuse, the altitude to the hypotenuse, and the two segments it creates — using the geometric mean relationships shared by the three similar right triangles.

Quick Facts

Altitude formula
h = (a × b) / c
The altitude to the hypotenuse equals the product of the legs divided by the hypotenuse.
Leg (geometric mean) relationships
a² = c·q and b² = c·p
Each leg is the geometric mean of the hypotenuse and the segment adjacent to that leg.
Altitude (geometric mean) relationship
h² = p·q
The altitude is the geometric mean of the two segments it cuts from the hypotenuse.
Three similar triangles
△ABC ~ △ACD ~ △CBD
The altitude from the right angle creates two smaller triangles, each similar to the original (AA similarity).

Your Results

Calculated
Hypotenuse (c)
-
c = √(a² + b²)
Altitude to hypotenuse (h)
-
h = (a × b) / c
Segment adjacent to leg b (p)
-
p = b² / c
Segment adjacent to leg a (q)
-
q = a² / c

Ready

Enter the two legs and a unit, then press Calculate.

How the Similar Right Triangles Calculator Works

Take any right triangle and drop a perpendicular altitude from the right angle straight down to the hypotenuse. That single line splits the original triangle into two smaller right triangles. All three triangles — the original and the two smaller pieces — share the same three angles, just arranged differently, so all three are similar by AA (angle-angle) similarity. That similarity is what makes the side lengths line up into clean proportions, known as the geometric mean relationships, which this calculator solves for you.

Formula derivation from similarity

Label the right triangle ABC with the right angle at C, legs a = BC and b = AC, and hypotenuse c = AB. Let the altitude from C meet the hypotenuse at point D, creating altitude h = CD and splitting AB into two segments: p = AD (next to leg b) and q = DB (next to leg a). Because △ACD ~ △ABC ~ △CBD, their corresponding sides are proportional, which gives three standard results: the hypotenuse from the Pythagorean theorem, c = √(a² + b²); the altitude as the geometric mean of the two segments, h² = p·q so h = ab/c; and each leg as the geometric mean of the hypotenuse and its adjacent segment, a² = c·q and b² = c·p, so q = a²/c and p = b²/c. As a check, p + q always equals c, and a² + b² = c·q + c·p = c·(p+q) = c², recovering the Pythagorean theorem from the similarity argument alone.

Common mistakes

  • Mixing up p and q: the segment p (next to leg b) is b²/c, and the segment q (next to leg a) is a²/c — it's easy to swap which segment belongs to which leg.
  • Forgetting to square the altitude relationship: h² = p·q, not h = p·q; skipping the square root is a common slip.
  • Mixing units: keep both legs in the same unit before calculating — convert inches to feet, or centimeters to meters, first.

Real-world applications

  • Surveying and construction use the altitude-on-hypotenuse relationships to find distances that are hard to measure directly, such as the height of a structure from ground shadows and sightlines.
  • Verifying that a corner is truly a right angle (framing, foundations, layout) often relies on the same similar-triangle proportions used here.
  • These relationships are also the geometric foundation for trigonometric ratios and for later topics such as the geometric mean theorem and altitude-on-hypotenuse proofs in geometry courses.

Frequently Asked Questions

What are similar right triangles?
When you draw the altitude from the right angle of a right triangle down to the hypotenuse, it splits the triangle into two smaller right triangles. Both smaller triangles are similar to each other and to the original triangle, because all three share the same set of acute angles (AA similarity).
What is the geometric mean relationship for the altitude?
The altitude to the hypotenuse is the geometric mean of the two segments it creates: h² = p × q, so h = √(p × q). Equivalently, h = (a × b) / c, where a and b are the legs and c is the hypotenuse.
How do I find the two segments of the hypotenuse?
Each leg is the geometric mean of the hypotenuse and the segment adjacent to it: a² = c × q and b² = c × p. Solving gives q = a²/c (the segment next to leg a) and p = b²/c (the segment next to leg b), and p + q always equals c.
How does this relate to the Pythagorean theorem?
Adding the two leg relationships gives a² + b² = c×q + c×p = c×(p+q) = c×c = c², which is exactly the Pythagorean theorem. The similar-triangle relationships are essentially a geometric proof of a² + b² = c².