Trigonometry Calculator
Find sin, cos, tan & inverses, or solve a right triangle
📐 Trig ratios for 30°
🔁 Same angle in both units
↩️ Inverse functions (principal value)
Feeding the ratios above back into the inverse functions returns the principal angle in degrees.
Note: inverse functions only return the principal value (arcsin and arctan in [-90°, 90°], arccos in [0°, 180°]), so for angles outside that range the result is the co-terminal principal angle, not your original input.
Results use IEEE-754 double precision and are rounded for display; values such as cos 90° are snapped to exact zero. Angles are interpreted in the unit you select above.
Last updated June 2026
Method: Ratios are computed with the standard unit-circle definitions and your browser's IEEE-754 math library. The right triangle is solved with the SOH-CAH-TOA ratios and the 180° angle-sum rule. Tiny floating-point residues (such as cos 90°) are snapped to exact zero.
Included: sin, cos, tan and the reciprocals csc, sec, cot; inverse functions; degree/radian conversion; and a full right-triangle solution with both acute angles, area and perimeter.
Not included: oblique (non-right) triangle solving via the laws of sines/cosines, complex-number arguments, and symbolic exact-radical output. Decimal results are rounded for display.
Trigonometry calculator: everything you need to know
Type an angle like 30° and this trigonometry calculator instantly returns sin 30° = 0.5, cos 30° ≈ 0.8660 and tan 30° ≈ 0.5774, along with the three reciprocal ratios and the inverse functions. Switch to triangle mode and the same angle plus one side length solves the whole right triangle — the other two sides, the second acute angle, the area and the perimeter. Whether you are checking trig homework, sizing a roof pitch, or working out how long a ladder needs to be, this tool turns angles into numbers (and numbers back into angles) in one place.
The three core ratios: SOH-CAH-TOA
In a right triangle, the three primary trig functions relate one acute angle to two of the three sides. Label the side opposite the angle, the side adjacent to it, and the hypotenuse (always the longest side, across from the 90° corner):
sin θ = opposite ÷ hypotenusecos θ = adjacent ÷ hypotenusetan θ = opposite ÷ adjacentThe mnemonic SOH-CAH-TOA packs all three into one phrase: Sine = Opposite / Hypotenuse, Cosine = Adjacent / Hypotenuse, Tangent = Opposite / Adjacent. Because the hypotenuse is the longest side, sine and cosine of an acute angle always fall between 0 and 1, while tangent can grow without bound as the angle approaches 90°.
The reciprocal ratios
Three more functions are simply the reciprocals of the first three. They appear constantly in calculus and physics identities, so the calculator reports them too:
csc θ = 1 ÷ sin θsec θ = 1 ÷ cos θcot θ = cos θ ÷ sin θ = 1 ÷ tan θWhere a denominator hits zero — for example cos 90° = 0 makes both tan and sec undefined — the calculator shows a dash instead of a misleading huge number.
Degrees vs radians
The same physical angle can be written two ways. Degrees divide a circle into 360 parts; radians measure the angle by the arc it sweeps on a unit circle, so a full turn is 2π radians. Convert with:
radians = degrees × (π ÷ 180) | degrees = radians × (180 ÷ π) That makes 180° = π ≈ 3.1416 radians, 90° = π/2 ≈ 1.5708, 60° = π/3 ≈ 1.0472, 45° = π/4 ≈ 0.7854 and 30° = π/6 ≈ 0.5236. Toggle the unit at the top of the calculator and every result re-expresses itself automatically — this is the bidirectional, instant-update behavior you would expect from a good converter.
How to use this trigonometry calculator
- Pick a mode: "Trig ratios" for sin/cos/tan of an angle, or "Solve a right triangle" to find missing sides.
- Choose your unit: degrees or radians. The quick-pick chips load common angles for you.
- Enter the angle (ratios mode), or the acute angle plus one side (triangle mode), choosing whether that side is the hypotenuse, the opposite, or the adjacent side.
- Read the result instantly: the large primary value updates as you type — no submit button needed.
- Scan the supporting cards: reciprocal ratios, the inverse-function values, and (in triangle mode) the step-by-step SOH-CAH-TOA derivation with a Pythagorean cross-check.
Worked example 1 — ratios of 30°
Enter 30 in degrees. The calculator returns sin 30° = 0.5 exactly, cos 30° ≈ 0.8660 (that is √3/2), and tan 30° ≈ 0.5774 (that is 1/√3). The reciprocals come out as csc 30° = 2, sec 30° ≈ 1.1547 and cot 30° ≈ 1.7321. Feeding 0.5 back into arcsine returns 30°, confirming the round trip. In radians the same angle reads as π/6 ≈ 0.5236, and all the ratios are identical because the angle itself has not changed — only its label.
Worked example 2 — a ladder against a wall
A ladder leans against a wall at a 70° angle to the ground and its foot is 1.2 m from the wall. The 1.2 m is the side adjacent to the 70° angle, so switch to triangle mode, set the angle to 70°, choose "Adjacent (b)", and enter 1.2. The solver returns the ladder length (the hypotenuse) as c = b ÷ cos 70° ≈ 3.51 m, the height it reaches as a = b × tan 70° ≈ 3.30 m, and the second angle as 20°. This is a textbook CAH/TOA problem, solved without you having to rearrange a single formula by hand.
Worked example 3 — roof rise from run and pitch
A roof has a 25° pitch and a horizontal run of 16 ft from the eave to the ridge line. The run is the adjacent side, so the vertical rise is a = 16 × tan 25° ≈ 7.46 ft, and the rafter length (hypotenuse) is 16 ÷ cos 25° ≈ 17.65 ft. The area of that right-triangle cross-section is about 59.7 ft². Carpenters use exactly this calculation — often phrased as "rise over run" — to cut rafters to length.
Reference table: exact values of common angles
These angles show up so often that their values are worth memorizing. The exact forms use the square roots √2 ≈ 1.4142 and √3 ≈ 1.7321:
| Degrees | Radians | sin | cos | tan |
|---|---|---|---|---|
| 0° | 0 | 0 | 1 | 0 |
| 30° | π/6 ≈ 0.5236 | 1/2 = 0.5 | √3/2 ≈ 0.8660 | 1/√3 ≈ 0.5774 |
| 45° | π/4 ≈ 0.7854 | √2/2 ≈ 0.7071 | √2/2 ≈ 0.7071 | 1 |
| 60° | π/3 ≈ 1.0472 | √3/2 ≈ 0.8660 | 1/2 = 0.5 | √3 ≈ 1.7321 |
| 90° | π/2 ≈ 1.5708 | 1 | 0 | undefined |
| 180° | π ≈ 3.1416 | 0 | -1 | 0 |
Who this calculator is for
- Students checking homework on the unit circle, trig ratios, or right-triangle problems.
- DIY builders and trades figuring out rafter lengths, ramp angles, stair stringers and ladder reach.
- Surveyors, drafters and makers converting between angles and distances on the fly.
- Programmers and game developers sanity-checking sin/cos values before wiring them into code (remembering that most languages use radians).
- Anyone who needs a quick degree-to-radian conversion or the exact value of a common angle.
Inverse trig functions explained
The inverse (or "arc") functions reverse the ratios: give arcsin a value and it returns the angle whose sine is that value. Because each ratio repeats endlessly around the circle, the inverses return only the principal value: arcsin and arctan lie in [-90°, 90°], and arccos in [0°, 180°]. So arcsin(0.5) = 30°, arccos(0.5) = 60°, and arctan(1) = 45°. This is why entering an angle, reading its sine, and then taking arcsine may not return your exact starting angle if it was outside the principal range — the calculator notes this where it matters.
Key terms at a glance
- Hypotenuse: the side opposite the right angle; always the longest side of a right triangle.
- Opposite / adjacent: defined relative to the angle you are working with — the opposite side faces the angle, the adjacent side touches it (other than the hypotenuse).
- Unit circle: a circle of radius 1 used to define sin and cos for any angle as the y- and x-coordinates of a point on the circle.
- Period: sin and cos repeat every 360° (2π); tan repeats every 180° (π). That periodicity is why large and negative angles are valid inputs.
- Principal value: the single angle an inverse function returns from its restricted output range.
Related concepts and where to go next
Trigonometry connects to several other tools. To raise numbers to powers inside an identity, use the Exponent Calculator; for roots like √2 and √3 that appear in exact trig values, the Square Root Calculator helps. For broader number crunching with built-in trig keys, try the Scientific Calculator. And for the percentage and averaging steps that often surround a trig problem, the Percentage and Average calculators are one click away below.
⚠️ Common mistakes & edge cases
Calculator stuck in the wrong angle unit
The single most common error: computing sin 30 in radian mode and getting ≈ -0.988 instead of 0.5. Always confirm whether you want degrees or radians — this calculator labels the active unit and lets you switch with one tap.
Mixing up opposite and adjacent
"Opposite" and "adjacent" are relative to the angle, not fixed labels. If you swap them you will use cos where you needed sin (or tan upside down). Identify which side faces your angle before choosing a ratio.
Expecting a finite tan at 90°
tan 90°, sec 90°, and the reciprocals at 0°/180° are undefined because they divide by zero. A real result of "infinity" or a giant number is a red flag — the value simply does not exist, which is why a dash appears here.
Trusting an inverse to return your exact input
Inverse functions only output the principal value. arcsin(sin 150°) returns 30°, not 150°. When you need the original angle, account for the function's restricted range and the quadrant you started in.
❓ Frequently asked questions
How do I find sin, cos and tan of an angle?
Enter the angle, pick degrees or radians, and the calculator returns all six trig ratios instantly. Sine is the ratio of the opposite side to the hypotenuse, cosine is adjacent over hypotenuse, and tangent is opposite over adjacent (the SOH-CAH-TOA memory aid). The reciprocal ratios cosecant, secant and cotangent are 1/sin, 1/cos and cos/sin respectively.
What is SOH-CAH-TOA?
SOH-CAH-TOA is a mnemonic for the three primary trig ratios in a right triangle: SOH means Sine = Opposite / Hypotenuse, CAH means Cosine = Adjacent / Hypotenuse, and TOA means Tangent = Opposite / Adjacent. 'Opposite' and 'adjacent' are relative to the angle you are looking at; the hypotenuse is always the longest side, across from the right angle.
What is the difference between degrees and radians?
Degrees split a full circle into 360 equal parts; radians measure the same angle by arc length, where a full circle is 2π radians. To convert, multiply degrees by π/180 to get radians, or multiply radians by 180/π to get degrees. So 180° = π radians, 90° = π/2, and 45° = π/4. Use the toggle to switch units; the ratios update automatically.
Why is tan(90°) undefined?
Tangent equals sin divided by cos, and cos(90°) = 0. Dividing by zero is undefined, so tan(90°), tan(270°) and similar angles have no finite value. The calculator shows a dash (—) at these angles. The same applies to secant (1/cos) at 90° and to cosecant (1/sin) and cotangent (cos/sin) at 0° and 180°, where sin = 0.
What does the inverse trig function give me?
Inverse functions go the other way: given a ratio, they return an angle. arcsin (sin⁻¹), arccos (cos⁻¹) and arctan (tan⁻¹) answer 'what angle has this sine/cosine/tangent?'. They return only the principal value — arcsin and arctan land in [-90°, 90°] and arccos in [0°, 180°] — because each ratio repeats for infinitely many angles.
How do I solve a right triangle from an angle and one side?
Switch to the triangle mode, enter one acute angle and one side (the hypotenuse, the side opposite the angle, or the side adjacent to it). Using sin, cos and tan, the calculator finds the other two sides, the second acute angle (90° minus your angle), the area and the perimeter. This is the everyday use of trigonometry for ramps, roofs, ladders and surveying.
What are the exact values for common angles?
Several angles have clean exact values worth memorizing: sin 30° = 1/2, cos 30° = √3/2; sin 45° = cos 45° = √2/2 ≈ 0.7071; sin 60° = √3/2, cos 60° = 1/2; tan 45° = 1. At 0° sine is 0 and cosine is 1; at 90° sine is 1 and cosine is 0. The reference table on this page lists these side by side.
Can this calculator handle negative or very large angles?
Yes. Trig functions are periodic, so an angle like 390° gives the same ratios as 30°, and -30° gives the negatives of the 30° sine and tangent. Enter any real number; the calculator wraps it around the unit circle automatically. For the triangle solver, however, the angle must be strictly between 0° and 90° because a right triangle only has acute non-right angles.
What are cosecant, secant and cotangent used for?
They are the reciprocal ratios: cosecant = 1/sin, secant = 1/cos, and cotangent = cos/sin (or 1/tan). They appear often in calculus, physics and engineering identities — for example, the derivative of tan is sec², and many integrals are written using sec and csc. For basic triangle work you rarely need them, which is why sin, cos and tan get top billing.
Is this trig calculator free and does it work offline?
Yes, it is completely free with no sign-up, and all computation runs in your browser using JavaScript's built-in Math library — nothing is sent to a server. Once the page has loaded it keeps working even if your connection drops, which makes it handy for homework, exams (where permitted) and fieldwork.
💡 Good to know
Programming languages use radians
JavaScript, Python, C and most others expect radians in Math.sin and friends. If you are coding and getting strange results, convert your degrees with degrees × π/180 first — exactly what this calculator does under the hood.
sin and cos always live between -1 and 1
If a sine or cosine result lands outside [-1, 1], something is wrong with the input. Only tangent (and the reciprocal functions) can exceed that range or become undefined.
Pythagoras is your free cross-check
After solving a right triangle, verify that a² + b² = c². The triangle mode shows this check automatically, so you can trust the sides before cutting wood or pouring concrete.
Related Calculators
Percentage Calculator
Solve any percentage problem - what is X% of Y and more
Fraction Calculator
Add, subtract, multiply and divide fractions
Scientific Calculator
A full scientific calculator with trig, logs and more
Average Calculator
Calculate the mean, median and mode of numbers
Square Root Calculator
Find the square root of any number
Exponent Calculator
Raise numbers to any power