Triangle Ratio Calculator

Calculate the triangle ratio precisely — enter your dimensions and get the result with the formula shown.

Quick Facts

Sine (SOH)
sin θ = opposite / hypotenuse
The reference angle's opposite side over the hypotenuse.
Cosine (CAH)
cos θ = adjacent / hypotenuse
The reference angle's adjacent side over the hypotenuse.
Tangent (TOA)
tan θ = opposite / adjacent
Also equals sin θ divided by cos θ.
Hypotenuse
c = √(a² + b²)
From the Pythagorean theorem.

Your Results

Calculated
Hypotenuse (c)
-
c = √(a² + b²)
Reference Angle (θ)
-
θ = arctan(opposite / adjacent)
Sine, Cosine, Tangent
-
Primary ratios (SOH-CAH-TOA)
Cosecant, Secant, Cotangent
-
Reciprocal ratios

Ready

Enter the opposite and adjacent side lengths, then press Calculate.

Formula and Method for Triangle Ratio (Trigonometric Ratios)

The "triangle ratios" are the trigonometric ratios of a right triangle: sine, cosine, and tangent, defined as ratios between the two legs and the hypotenuse relative to a reference angle θ. Given the lengths of the side opposite θ and the side adjacent to θ, this calculator finds the hypotenuse, the angle θ itself, and all six trigonometric ratios (sine, cosine, tangent, and their reciprocals cosecant, secant, cotangent).

How the calculation works

First, the hypotenuse is found with the Pythagorean theorem: c = √(a² + b²), where a is the opposite side and b is the adjacent side. The reference angle is then θ = arctan(a / b) (the inverse tangent of opposite over adjacent). From there the three primary ratios follow directly: sin θ = a/c (SOH: opposite over hypotenuse), cos θ = b/c (CAH: adjacent over hypotenuse), and tan θ = a/b (TOA: opposite over adjacent). The three reciprocal ratios are csc θ = c/a, sec θ = c/b, and cot θ = b/a.

Common mistakes

  • Mixing up opposite and adjacent: "opposite" and "adjacent" are always relative to the angle you're solving for — swapping them flips sine and cosine and changes the angle you compute.
  • Degrees vs. radians: arctan() in most calculators and programming languages returns radians by default; convert to degrees by multiplying by 180/π before comparing to a protractor reading.
  • Non-right triangles: these ratios only apply to right triangles. For a triangle with no 90° angle, use the Law of Sines or Law of Cosines instead.

Real-world applications

  • Surveying and navigation use these ratios to find distances and heights that can't be measured directly (e.g., a building's height from a known distance and angle of elevation)
  • Construction and carpentry use them to calculate roof pitch, stair rise/run angles, and ramp slopes
  • Physics uses sine and cosine constantly to resolve vectors (forces, velocities) into perpendicular components
  • Engineering and architecture use trigonometric ratios for structural load angles and design geometry

Frequently Asked Questions

What are the trigonometric ratios of a right triangle?
For a reference angle θ in a right triangle, sine is the opposite side divided by the hypotenuse (sin θ = opposite/hypotenuse), cosine is the adjacent side divided by the hypotenuse (cos θ = adjacent/hypotenuse), and tangent is the opposite side divided by the adjacent side (tan θ = opposite/adjacent). These are commonly remembered with the mnemonic SOH-CAH-TOA.
How do I find the angle from two side lengths?
If you know the side opposite and adjacent to the angle, use the inverse tangent: θ = arctan(opposite/adjacent). For example, with opposite = 3 and adjacent = 4, θ = arctan(3/4) ≈ 36.87°.
What are cosecant, secant, and cotangent?
They are the reciprocals of the three primary ratios: cosecant is 1/sin θ (hypotenuse/opposite), secant is 1/cos θ (hypotenuse/adjacent), and cotangent is 1/tan θ (adjacent/opposite).
Do these ratios only work for right triangles?
Yes. Sine, cosine, and tangent as opposite/adjacent/hypotenuse ratios are defined for right triangles. For triangles without a 90° angle, use the Law of Sines or Law of Cosines instead.