Skip to main content

Geometry

How to Find the Height of a Right Triangle: Formulas and Examples

Find the height of a right triangle from two legs, the area, the hypotenuse and a leg, or a side and an angle. Formulas, a decision table and worked examples.

Right triangle with legs of 9 and 12 units and a dashed altitude of 7.2 drawn from the right angle to the hypotenuse of 15

The height of a right triangle depends on which side you call the base. If the base is one leg, the height is simply the other leg, because the two legs meet at 90°. If you only know the area, use h = 2 × Area ÷ base. If you know the hypotenuse and the base leg, use h = √(c² − b²). If you know a side and an angle, use h = c × sin θ or h = b × tan θ. If the base is the hypotenuse, the height is the altitude h = ab ÷ c. For example, a right triangle with legs 9 and 12 has a height of 9 on the base of 12, and a height of 7.2 on the hypotenuse of 15. To get every side and angle at once, enter what you know in the right triangle calculator or the Pythagorean theorem calculator.

Figure 1

height a = 9 base b = 12 c = 15
With the leg of 12 as the base, the height is the other leg, 9. The two legs are perpendicular, so no extra work is needed.

What “height” means in a right triangle

In any triangle, the height (or altitude) for a chosen base is the perpendicular distance from that base to the opposite corner. MathWorld gives the general definition of an altitude : a segment from a vertex that meets the opposite side, or its extension, at a right angle.

A right triangle has three possible bases, so it has three heights:

  • Base = leg b. The height is leg a. It runs along the side of the triangle.
  • Base = leg a. The height is leg b, for the same reason.
  • Base = hypotenuse c. The height is a new segment drawn from the right-angle corner down to the hypotenuse. It sits inside the triangle and is always shorter than both legs.

That is why a question that says “find the height of a right triangle” can have more than one correct answer. Before you calculate, decide which side is the base. In most textbook drawings the base is the horizontal leg along the bottom, and the height is the vertical leg. When a problem names the hypotenuse as the base, or asks for the “altitude to the hypotenuse”, you need the third height.

Which formula to use

Pick the row that matches the base you have chosen and the facts you were given.

Base chosenWhat you knowHeight formula
Leg bBoth legsh = a (the other leg)
Leg bArea and bh = 2 × Area ÷ b
Leg bHypotenuse c and bh = √(c² − b²)
Leg bb and the angle θ at the far end of the baseh = b × tan θ
Leg bHypotenuse c and the angle θ between c and the baseh = c × sin θ
Hypotenuse cBoth legsh = ab ÷ c
Hypotenuse cArea and ch = 2 × Area ÷ c

Every formula in the table comes from one of three ideas: the area formula, the Pythagorean theorem, or a trig ratio. The sections below take them one at a time.

Method 1: the other leg is the height

When the base is a leg, the height is the other leg. Nothing needs to be computed. A right triangle with legs of 9 cm and 12 cm, resting on the 12 cm leg, stands 9 cm tall. Turn it so it rests on the 9 cm leg and it stands 12 cm tall.

This is the reason the area of a right triangle is so easy to find. The general triangle area formula is ½ × base × height, and in a right triangle the two legs already supply a base and a matching height:

Area = ½ × base × heightArea = ½ × a × bArea = ½ × 9 × 12 = 54 cm²

In a right triangle the two legs are a base and its height, so the area is half their product.

Method 2: height from the area and the base

If you know the area and the length of the base, rearrange the area formula to solve for the height:

Area = ½ × base × h2 × Area = base × hh = 2 × Area ÷ base

Double the area, then divide by the base.

Suppose a right-triangle garden bed covers 42 m², and the leg along the fence is 12 m. The height (the other leg) is h = 2 × 42 ÷ 12 = 84 ÷ 12 = 7 m. Doubling first is the step people skip, and skipping it gives 3.5 m, which is exactly half the right answer.

The same formula works for the height to the hypotenuse. Just divide by the hypotenuse instead of a leg.

Method 3: height from the hypotenuse and one leg

When you know the hypotenuse and the leg that serves as the base, the height is the missing leg. The Pythagorean theorem a² + b² = c² rearranges to:

a² + b² = c²a² = c² − b²h = a = √(c² − b²)

Subtract the square of the base leg from the square of the hypotenuse, then take the square root.

For a triangle with hypotenuse 26 in and base leg 24 in, the height is √(26² − 24²) = √(676 − 576) = √100 = 10 in. Those numbers are the 5-12-13 triple doubled, which the guide to the 5-12-13 triangle covers in detail. Recognising a triple like this lets you skip the square root, but the formula always works, whole numbers or not.

Method 4: height from a side and an angle

If you know one side and one acute angle, a trig ratio gives the height. The two cases you meet most often are:

  • You know the hypotenuse c and the angle θ between the hypotenuse and the base. The height is opposite θ, so sine applies: h = c × sin θ.
  • You know the base b and the angle θ at the far end of the base (between the base and the hypotenuse). The height is opposite θ and the base is adjacent, so tangent applies: h = b × tan θ.
sin θ = opposite ÷ hypotenuse, so h = c × sin θtan θ = opposite ÷ adjacent, so h = b × tan θ

The height is the side opposite the base angle, so sine or tangent finds it directly.

A ladder 20 ft long leans against a wall at 35° to the ground. The ladder is the hypotenuse and the wall height it reaches is opposite the 35° angle, so h = 20 × sin 35° ≈ 20 × 0.573576 ≈ 11.47 ft. A ramp that runs 15 m horizontally and climbs at 40° rises h = 15 × tan 40° ≈ 15 × 0.839100 ≈ 12.59 m.

If you are unsure which ratio to choose, label the sides opposite, adjacent and hypotenuse relative to the angle you know, then use the SOHCAHTOA rules. Make sure your calculator is in degree mode before you press sin or tan.

Method 5: the height to the hypotenuse

When the hypotenuse is the base, the height is the altitude from the right-angle corner. The shortest way to find it uses the area twice. The area is ½ab using the legs, and also ½ch using the hypotenuse and its height. Set them equal:

½ × a × b = ½ × c × hh = ab ÷ ch = (9 × 12) ÷ 15 = 108 ÷ 15 = 7.2

The altitude to the hypotenuse equals the product of the legs divided by the hypotenuse.

Figure 2

9 12 h = 7.2 5.4 9.6
With the hypotenuse of 15 as the base, the height is the altitude of 7.2. It splits the hypotenuse into 5.4 and 9.6, which add to 15.

The altitude also splits the hypotenuse into two segments and creates two smaller triangles similar to the original one. Those relationships (h² = pq, a² = pc and b² = qc) belong to the right triangle altitude theorem, which works through the proofs and more examples. For finding a height, h = ab ÷ c is all you need.

Isosceles and equilateral triangles: split them into right triangles

The most common use of right-triangle height outside of right triangles is finding the height of an isosceles or equilateral triangle. Drop a perpendicular from the top corner to the base. In an isosceles triangle it lands at the midpoint of the base, so it cuts the shape into two matching right triangles. The height is a leg of each one, and half the base is the other leg:

h = √(side² − (base ÷ 2)²)

The equal side is the hypotenuse of each half, and half the base is the other leg.

An isosceles triangle with sides 13, 13 and 10 has a height of √(13² − 5²) = √(169 − 25) = √144 = 12, and an area of ½ × 10 × 12 = 60.

Figure 3

1 1 2 2 √3 30° 30° 60° 60°
An equilateral triangle of side 2 split by its height. Each half is a 30-60-90 triangle with legs 1 and √3 and hypotenuse 2.

An equilateral triangle works the same way. With side s, half the base is s ÷ 2, so h = √(s² − s²/4) = (√3 ÷ 2) × s. For side 10, h = 5√3 ≈ 8.66. Each half is a 30-60-90 triangle, and the 30-60-90 triangle guide shows why the long leg is always √3 times the short leg.

Real-world heights: trees, buildings and poles

Many height problems never mention a triangle at all. You stand some distance from a tree or a flagpole, measure the angle from the ground (or from your eye) up to the top, and the height is the vertical leg of an imaginary right triangle. The ground distance is the base, the angle sits at your end of the base, and tangent gives the height.

Figure 4

12 m h ≈ 14.30 m line of sight 50°
Standing 12 m from a flagpole, the angle up to the top is 50°. The pole is the height of a right triangle whose base is the 12 m distance.

From 12 m away, an angle of elevation of 50° gives h = 12 × tan 50° ≈ 12 × 1.191754 ≈ 14.30 m. If the angle was measured from eye level 1.5 m above the ground, add that on: the pole is about 15.80 m tall. The full method, including angles of depression from a high point, is in the guide to the angle of elevation and depression, and the angle of elevation calculator solves these in one step.

Worked examples

Example 1 Height when the base is a leg

Given
A right triangle with legs 9 cm and 12 cm, resting on the 12 cm leg
Find
The height and the area
Formula
h = other leg, Area = ½ × base × h
Substitution
h = 9, Area = ½ × 12 × 9
Calculation
½ × 108 = 54

Answer h = 9 cm, Area = 54 cm²

Example 2 Height from the area

Given
Area 42 m², base leg 12 m
Find
The height h
Formula
h = 2 × Area ÷ base
Substitution
h = 2 × 42 ÷ 12
Calculation
84 ÷ 12 = 7

Answer h = 7 m

Example 3 Height from the hypotenuse and a leg

Given
Hypotenuse 26 in, base leg 24 in
Find
The height h
Formula
h = √(c² − b²)
Substitution
h = √(26² − 24²)
Calculation
√(676 − 576) = √100 = 10

Answer h = 10 in

Example 4 Height from the hypotenuse and an angle

Given
A 20 ft ladder at 35° to the ground
Find
How high up the wall the ladder reaches
Formula
h = c × sin θ
Substitution
h = 20 × sin 35°
Calculation
20 × 0.573576 ≈ 11.4715

Answer h ≈ 11.47 ft

Example 5 Height to the hypotenuse

Given
A right triangle with legs 9 and 12
Find
The height when the hypotenuse is the base
Formula
c = √(a² + b²), h = ab ÷ c
Substitution
c = √(81 + 144) = 15, h = (9 × 12) ÷ 15
Calculation
108 ÷ 15 = 7.2

Answer h = 7.2 units

Example 6 Height of an equilateral triangle

Given
An equilateral triangle with side 10 cm
Find
The height h
Formula
h = √(s² − (s ÷ 2)²) = (√3 ÷ 2) × s
Substitution
h = √(10² − 5²) = √75
Calculation
√75 = 5√3 ≈ 8.6603

Answer h ≈ 8.66 cm

Try It Yourself

A right triangle has an area of 30 cm² and a hypotenuse of 13 cm. Find its height when the hypotenuse is the base. Then find the lengths of the two legs, which are the heights for the other two bases.

Show the answer

The height to the hypotenuse is h = 2 × 30 ÷ 13 = 60 ÷ 13 ≈ 4.62 cm.

For the legs, (a + b)² = a² + b² + 2ab = 169 + 120 = 289, so a + b = 17. Two numbers that add to 17 and multiply to 60 are 5 and 12. The legs are 5 cm and 12 cm, so the height is 12 cm on the base of 5, and 5 cm on the base of 12. Check: ½ × 5 × 12 = 30, and 5² + 12² = 169 = 13².

Mistakes to avoid

  • Assuming there is only one height. A right triangle has three heights, one for each possible base. Read which base the question uses.
  • Forgetting to double the area. The formula is h = 2 × Area ÷ base. Dividing the area by the base without doubling gives half the height.
  • Adding squares instead of subtracting. When you know the hypotenuse and a leg, h = √(c² − b²). A plus sign gives a “height” longer than the hypotenuse.
  • Using the hypotenuse as the height. The hypotenuse is never perpendicular to either leg, so it can never be the height for a leg as base.
  • Mixing up sine and tangent. Use sine when you know the hypotenuse, tangent when you know the base leg next to the angle.
  • Leaving the calculator in radians. sin 35 in radian mode is about −0.43, which gives a negative height.
  • Thinking the altitude to the hypotenuse is half of something. It is ab ÷ c, which is not half the hypotenuse or the average of the legs.

Practice questions

  1. A right triangle has legs 8 and 15. Find its height when the base is the leg of 15, and its height when the base is the hypotenuse.
  2. A right triangle has an area of 96 ft² and a base leg of 16 ft. Find the height.
  3. The hypotenuse of a right triangle is 41 cm and the base leg is 40 cm. Find the height.
  4. A ramp covers 30 m of horizontal ground and rises at 22°. How high does it rise?
  5. An isosceles triangle has sides 17, 17 and 16. Find its height to the side of 16.

Answer key

  1. On the base of 15 the height is the other leg, 8. The hypotenuse is √(64 + 225) = 17, so the height to it is (8 × 15) ÷ 17 = 120 ÷ 17 ≈ 7.06.
  2. h = 2 × 96 ÷ 16 = 192 ÷ 16 = 12 ft.
  3. h = √(41² − 40²) = √(1681 − 1600) = √81 = 9 cm.
  4. h = 30 × tan 22° ≈ 30 × 0.404026 ≈ 12.12 m.
  5. Half the base is 8, so h = √(17² − 8²) = √(289 − 64) = √225 = 15.

For more mixed questions in context, try the Pythagorean theorem word problems. OpenStax also has a useful section on triangle properties and the Pythagorean theorem with extra exercises.

Frequently Asked Questions

Is the height of a right triangle always one of the legs?

Only when the base is a leg. If the base is one leg, the height is the other leg. If the base is the hypotenuse, the height is the altitude from the right angle, h = ab ÷ c, which is shorter than both legs.

What is the formula for the height of a right triangle?

There is one formula for each set of known facts: h = a (the other leg), h = 2 × Area ÷ base, h = √(c² − b²), h = c × sin θ, h = b × tan θ, or h = ab ÷ c for the height to the hypotenuse. The decision table near the top of this page shows which one to use.

Can I find the height of a right triangle if I only know the hypotenuse?

No. One length fixes the size but not the shape, so you need a second fact: a leg, an acute angle, or the area. With the hypotenuse and an angle, use h = c × sin θ.

Can the height be longer than the hypotenuse?

No. The hypotenuse is the longest side of a right triangle, and every height (both legs and the altitude to the hypotenuse) is shorter than it. A height longer than the hypotenuse means a sign or input error.

How do I find the height of a right triangle without the area?

Use the sides or an angle instead. With the hypotenuse and a leg, h = √(c² − b²). With the base and an angle, h = b × tan θ. With both legs, the height on either leg is the other leg, and the height on the hypotenuse is ab ÷ c.