What this calculator does
The Trig Ratio from Sides Calculator computes the six trigonometric ratios — sine, cosine, tangent, cosecant, secant and cotangent — for an acute angle θ in a right triangle, using the lengths of its sides. It also reports the angle θ in degrees and fills in the hypotenuse automatically when you supply only the two legs.
How to use it
Identify your angle θ. Enter the side opposite θ, the side adjacent to θ, and the hypotenuse (the side across from the right angle). If you know only the two legs, leave the hypotenuse blank and it will be derived from the Pythagorean theorem.
The formulas
The three primary ratios are \(\sin\theta = \frac{O}{H}\), \(\cos\theta = \frac{A}{H}\), and \(\tan\theta = \frac{O}{A}\). The reciprocals are \(\csc\theta = \frac{1}{\sin\theta}\), \(\sec\theta = \frac{1}{\cos\theta}\), and \(\cot\theta = \frac{1}{\tan\theta}\). When the hypotenuse is unknown it is found with \(c = \sqrt{a^{2} + b^{2}}\).
$$\begin{gathered} \sin\theta = \frac{O}{H}, \quad \cos\theta = \frac{A}{H}, \quad \tan\theta = \frac{O}{A} \\[0.4em] \csc\theta = \frac{H}{O}, \quad \sec\theta = \frac{H}{A}, \quad \cot\theta = \frac{A}{O} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} O &= \text{Opposite} \\ A &= \text{Adjacent} \\ H &= \text{Hypotenuse} = \sqrt{O^{2} + A^{2}} \end{aligned} \right. \end{gathered}$$
Worked example
Consider the classic 3-4-5 right triangle with opposite = 3, adjacent = 4, hypotenuse = 5. Then \(\sin\theta = \frac{3}{5} = 0.6\), \(\cos\theta = \frac{4}{5} = 0.8\), and \(\tan\theta = \frac{3}{4} = 0.75\). The reciprocals are \(\csc\theta \approx 1.6667\), \(\sec\theta = 1.25\), and \(\cot\theta \approx 1.3333\). The angle \(\theta = \operatorname{atan}(3/4) \approx 36.87°\).
FAQ
What if I only know the two legs? Leave the hypotenuse field blank or zero — the calculator computes it with the Pythagorean theorem.
Why is my angle close but not exact? Trig values are irrational for most angles; results are rounded for display while the raw value keeps full precision.
Does this work for any triangle? No — these ratios apply only to right triangles. For non-right triangles use the law of sines or cosines.