SOH CAH TOA: How to Solve Any Right Triangle From Two Values

Label a right triangle correctly, pick sine, cosine or tangent, find missing sides and angles with inverse trig, and avoid the degrees vs radians trap.

Updated September 29, 2026 7 min read

Use the free Right Triangle CalculatorSolve any right triangle from two values: sides, angles, area and more

Right triangles are everywhere in practical measurement: the slope of a ramp, the height of a building from its shadow, the reach of a ladder, the pitch of a roof, the diagonal of a screen. In each case you know two things (two lengths, or a length and an angle) and need the rest. Trigonometry gives you the tools, and the mnemonic SOH CAH TOA tells you which one to use.

This guide explains how to label a right triangle, how to choose between sine, cosine and tangent, how to find angles with inverse functions, and how the Pythagorean theorem fits in. It then shows the extra quantities you can get once a triangle is solved, and the mistakes that cause most wrong answers.

Labelling the triangle

A right triangle has one 90° angle. The side opposite it is the hypotenuse, always the longest side. The other two sides are the legs, and their names depend on which acute angle you are looking at:

  • Opposite: the leg across from the angle.
  • Adjacent: the leg next to the angle (that is not the hypotenuse).

A standard convention names the right angle C, the acute angles A and B, and each side after the angle opposite it: side a is opposite angle A, b is opposite B, and c is the hypotenuse. Relative to angle A, side a is opposite and side b is adjacent. Relative to angle B, they swap.

Getting this labelling right is most of the battle. Before calculating, mark the angle you are working with and label the three sides relative to it.

SOH CAH TOA

The three basic ratios for an acute angle A are:

Mnemonic Ratio Meaning
SOH sin A = opposite ÷ hypotenuse a ÷ c
CAH cos A = adjacent ÷ hypotenuse b ÷ c
TOA tan A = opposite ÷ adjacent a ÷ b

To choose one, look at which two sides are involved (the one you know and the one you want, or the two you know if you want the angle), and pick the ratio that uses exactly those two.

Finding a missing side

Example 1: hypotenuse and angle. A support cable is 10 m long and meets the ground at A = 35°. How high up the mast does it attach, and how far from the base is it anchored?

  • Height is opposite A, and you know the hypotenuse, so use sine: a = 10 × sin 35° ≈ 5.736 m.
  • Distance is adjacent to A, so use cosine: b = 10 × cos 35° ≈ 8.192 m.
  • The other angle is B = 90° − 35° = 55°.

Example 2: one leg and angle. A conveyor must rise 1.2 m at an angle of 15°. How long is it, and how much floor does it cover?

  • Rise is opposite, and the length is the hypotenuse: c = 1.2 ÷ sin 15° ≈ 4.636 m.
  • Floor distance is adjacent: b = 1.2 ÷ tan 15° ≈ 4.478 m.

When the unknown is in the denominator of the ratio, you divide rather than multiply. Writing the ratio out first (sin 15° = 1.2 ÷ c) and then rearranging avoids that confusion.

Finding an angle: inverse functions

If you know two sides and need an angle, use the inverse functions sin⁻¹, cos⁻¹ and tan⁻¹ (also called arcsin, arccos and arctan). They answer the question "which angle has this ratio?"

Example 3: two legs. A ramp rises 1 unit for every 4 units of horizontal run. Its angle is tan⁻¹(1 ÷ 4) ≈ 14.04°. Accessibility guidance often expresses ramp slopes as a ratio such as 1:12, which corresponds to tan⁻¹(1 ÷ 12) ≈ 4.76°; check your local building regulations for the actual requirement.

Example 4: the classic 3-4-5 triangle. With legs a = 3 and b = 4, angle A = tan⁻¹(3 ÷ 4) ≈ 36.87°, and B ≈ 53.13°.

Where Pythagoras fits in

When you know two sides and want the third, you do not need trigonometry at all:

a² + b² = c²

For legs 3 and 4, c = √(9 + 16) = 5. For a hypotenuse of 6.5 and a leg of 2.5, the other leg is √(6.5² − 2.5²) = √(42.25 − 6.25) = √36 = 6.

That last example is a ladder problem. A 6.5 m ladder with its foot 2.5 m from a wall reaches 6 m up. The angle between the ladder and the ground is the angle opposite the 6 m wall, cos⁻¹(2.5 ÷ 6.5) ≈ 67.38°. The angle at the top, between ladder and wall, is 22.62°. Being clear about which angle is asked for matters as much as the arithmetic. For side-only problems, the Pythagorean Theorem Calculator is the most direct tool.

What else you can calculate

Once all three sides are known, several useful quantities follow directly. For the 3-4-5 triangle:

Quantity Formula Value
Area ½ab 6
Perimeter a + b + c 12
Altitude to the hypotenuse ab ÷ c 2.4
Inradius (largest inscribed circle) (a + b − c) ÷ 2 1
Circumradius c ÷ 2 2.5

The circumradius is always half the hypotenuse, because the hypotenuse of a right triangle is a diameter of its circumscribed circle.

Solving a right triangle with the calculator

The Right Triangle Calculator solves the whole triangle from any two values.

  1. Enter exactly two of the five values, including at least one side: Side a (leg opposite angle A), Side b (leg adjacent to angle A), Side c (hypotenuse), Angle A or Angle B. Angles are in degrees, between 0 and 90.
  2. Leave the other three blank. If you fill in more than two, the tool tells you to clear some; use Clear to start again.
  3. Read the solved triangle: all three sides, both angles in degrees and radians, the area, perimeter, altitude to the hypotenuse, inradius and circumradius, plus sin A, cos A and tan A.
  4. Check the diagram, which labels the sides and angles, and open the steps to see which SOH CAH TOA ratio or Pythagorean step was used.

The tool rejects impossible inputs, such as a leg longer than the hypotenuse, and explains that two angles alone fix the shape but not the size.

Other ways to solve right triangles

  • A scientific calculator handles every step, provided it is in degree mode. Our Scientific Calculator has trig and inverse trig functions.
  • Spreadsheets work in radians: use =SIN(RADIANS(35)) for the sine of 35°, and =DEGREES(ATAN(1/4)) for an angle.
  • Triangles without a right angle need the law of sines or law of cosines; the Triangle Calculator solves those.
  • Unit conversion between degrees and radians is covered by the Degrees to Radians converter.

Common mistakes

Calculator in radian mode

sin 35 in radians is about −0.428; sin 35° is about 0.574. If a trig result is negative or oddly sized for an acute angle, check the mode first.

Labelling relative to the wrong angle

"Opposite" and "adjacent" change when you switch from angle A to angle B. Relabel for every new angle.

Using sin⁻¹ with a ratio above 1

sin⁻¹(1.2) has no answer. A ratio above 1 means a leg has been entered as longer than the hypotenuse, which is impossible.

Rounding too early

Keep full precision in intermediate steps. Rounding an angle to 36.9° and then computing a side can shift the answer in the second decimal place.

Mixing up the angle asked for

In ladder and ramp problems, check whether the question wants the angle with the ground or with the wall. They add to 90°.

Frequently asked questions

What does SOH CAH TOA stand for?

Sine = Opposite ÷ Hypotenuse, Cosine = Adjacent ÷ Hypotenuse, Tangent = Opposite ÷ Adjacent. It is a memory aid for the three basic trigonometric ratios.

How do I know whether to use sin, cos or tan?

Identify the two sides involved relative to your angle: the one you know and the one you need. Opposite and hypotenuse means sine, adjacent and hypotenuse means cosine, opposite and adjacent means tangent.

How do I find an angle when I know two sides?

Form the ratio of the two sides and apply the matching inverse function. For example, if opposite = 3 and adjacent = 4, the angle is tan⁻¹(0.75) ≈ 36.87°.

Can I solve a right triangle from two angles?

No. Two angles fix the shape but not the size, so you need at least one side length.

Why is the hypotenuse always the longest side?

It is opposite the largest angle, the 90° angle, and in any triangle the longest side is opposite the largest angle. Pythagoras confirms it: c² equals a² plus b², so c is bigger than either.

Try it now: Right Triangle Calculator

Loading tool…