Right Triangle Calculator

Hypotenuse, angle, and ratios from two legs with SOHCAHTOA.

Math and PercentUpdated 2026-10-111 min read
Right Triangle Calculator
Hypotenuse
...
Angle...
Sine...

What it does

Right triangles resolve through two facts: Pythagoras builds the hypotenuse from the legs while SOHCAHTOA reads every ratio off the sides. Legs 3 by 4 give hypotenuse 5 at 36.87 degrees with sine 0.6.

The tool above takes opposite with adjacent legs. It returns hypotenuse, acute angle, and sine beside them. Cosine, tangent, and reciprocals ride in the note.

Ratios match OpenStax precalculus in both editions: sine as opposite over hypotenuse, cosine adjacent over, tangent opposite over adjacent, with the 3-4-5 triangle reading 0.8, 0.6, and 1.333 across its angles. Special triangles extend the pattern with exact roots for 30, 45, and 60 degrees.

Angle always faces its opposite leg, and the hypotenuse always faces the right angle as the longest side. Either acute angle works with flipped opposite and adjacent labels.

How to use

  1. Type the opposite leg to your angle.
  2. Type the adjacent leg.
  3. Read hypotenuse first, angle beside it.
  4. Read sine, then ratios in the note.
  5. Flip labels for the other acute angle.
  6. Keep units matched across legs.

Formula

h = root(o^2 + a^2). Angle = arctan(o/a). sin = o/h, cos = a/h, tan = o/a.
o, a
Opposite and adjacent legs to the angle.
h
Hypotenuse from Pythagoras.
SOHCAHTOA
Sine/cosine/tangent ratio memory.

Reciprocals follow: secant is h/a, cosecant h/o, cotangent a/o. Degrees out; multiply by pi/180 for radians.

Worked example

Example: legs 3 by 4

Defaults: opposite 3, adjacent 4.

  1. Hypotenuse: root(9 + 16) = 5.
  2. Angle: arctan(3/4) = 36.87 deg.
  3. Sine: 3 / 5 = 0.6.
  4. Cosine check: 4 / 5 = 0.8.
  5. Tangent check: 3 / 4 = 0.75.
  6. Tool shows 5, 36.87 deg, 0.6.

Reference table

Checked triangles
LegsHypotenuseAngle and sine
3 by 4536.87 deg, sine 0.6
4 by 3553.13 deg, sine 0.8
8 by 151728.07 deg, sine 0.4706
1, root 3, 230-60-90Sine 0.5 and 0.866
1, 1, root 245-45-90Sine 0.7071

Limits

  • Right triangles only.
  • Legs input; hypotenuse solves.
  • Degrees out by default.
  • Flat geometry; spheres differ.

Common mistakes

  • Labeling hypotenuse as a leg.
  • Reading sine off the wrong angle.
  • Mixing degrees with radians.
  • Forgetting which leg is opposite.
  • Trusting rounded angles in chains.

Try it yourself

Quick checks. Answers sit tucked under each question.

Opposite 4, adjacent 3?

Hyp 5, 53.13 deg, sine 0.8.

Opposite 8, adjacent 15?

Hyp 17, 28.07 deg, sine 0.4706.

Zero leg?

Rejected: enter both legs above 0.

Questions

Default answer?

Hyp 5 at 36.87 deg with sine 0.6.

SOHCAHTOA?

Sine opposite/hypotenuse, cosine adjacent/hypotenuse, tangent opposite/adjacent.

Other acute angle?

Flip opposite and adjacent labels.

Special triangles?

30-60-90 runs 1, root 3, 2; 45-45-90 runs 1, 1, root 2.

Radians?

Multiply degrees by pi over 180.

Pythagoras page versus this?

That solves sides; this adds angles and ratios.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.