Skip to content

Trigonometry Calculator: Sin, Cos, Tan and Inverse Functions

Sine, cosine, tangent and their reciprocals with exact values, plus arcsin, arccos, arctan and atan2.

Your details

Calculation

A number, a fraction or a multiple of π: 30, -45.5, 1/3, π/6, 2pi/3.

Angle unit

Results update as you type

Value

1/2

Decimal value
0.5
Angle in radians
π/6 ≈ 0.5235987756
Angle in degrees
30 °
Position
Quadrant I
Reference angle
30 °

Step-by-step solution
  1. Coterminal angle in [0°, 360°): 30°; reference angle 30°
  2. sin(30°) = 1/2 ≈ 0.5

Trigonometry links angles to lengths. This calculator works in both directions. Give it an angle and pick a function — sine, cosine, tangent or one of their reciprocals, cotangent, secant, cosecant — and it returns the value. Give it a ratio instead and the inverse functions arcsin, arccos, arctan or the two-argument atan2 return the angle.

Unlike a basic calculator, it recognizes the special angles that appear in every textbook. For any multiple of 15° (or of π/12\pi/12 radians) you get the exact value — 32\frac{\sqrt{3}}{2}, 22\frac{\sqrt{2}}{2}, 2−32 - \sqrt{3} — next to the decimal. It never shows rounding noise such as 1.22×10−161.22 \times 10^{-16} for sin⁡180°\sin 180°: the answer is exactly 0. And when a function has no value, as tan⁡90°\tan 90° does, it says undefined instead of printing an enormous number.

You can type the angle as a decimal, a fraction or a multiple of π (π/6, 2pi/3), in degrees, radians or gradians. Every answer comes with the coterminal angle, the quadrant, the reference angle and a table of all six functions.

How to use this calculator

To evaluate a function:

  1. Keep the mode on sin, cos, tan… of an angle and choose the function.
  2. Type the angle. Use pi or π for radians, e.g. 3pi/4.
  3. Choose the unit: degrees, radians or gradians (400 gradians make a full turn).
  4. Read the value, exact when the angle is a multiple of 15°, and the table with all six functions.

To find an angle:

  1. Switch to Find the angle and choose arcsin, arccos, arctan or atan2.
  2. Type the ratio. Roots are accepted: √3/2, sqrt(2)/2, -1/2.
  3. For atan2, enter the coordinates yy and xx of a point; the result is its direction, quadrant included.
  4. Read the angle in degrees, radians (with the π form for special angles) and gradians.

The formula

On the unit circle, the point at angle θ\theta from the positive x-axis has coordinates (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta). In a right triangle, that becomes the familiar ratios of sides:

sin⁡θ=oppositehypotenuse,cos⁡θ=adjacenthypotenuse,tan⁡θ=sin⁡θcos⁡θ\sin\theta = \frac{\text{opposite}}{\text{hypotenuse}}, \quad \cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}}, \quad \tan\theta = \frac{\sin\theta}{\cos\theta}

The reciprocal functions are cot⁡θ=cos⁡θsin⁡θ\cot\theta = \frac{\cos\theta}{\sin\theta}, sec⁡θ=1cos⁡θ\sec\theta = \frac{1}{\cos\theta} and csc⁡θ=1sin⁡θ\csc\theta = \frac{1}{\sin\theta}. They are undefined wherever their denominator is zero: tan⁡\tan and sec⁡\sec at 90°+k⋅180°90° + k \cdot 180°, cot⁡\cot and csc⁡\csc at k⋅180°k \cdot 180°.

Units convert with π rad=180°=200 gon\pi\ \text{rad} = 180° = 200\ \text{gon}. Any angle is first reduced to [0°,360°)[0°, 360°), then to a reference angle between 0° and 90°; the quadrant gives the sign.

The inverse functions return principal values: arcsin⁡x∈[−90°,90°]\arcsin x \in [-90°, 90°] and arccos⁡x∈[0°,180°]\arccos x \in [0°, 180°] for −1≤x≤1-1 \le x \le 1, and arctan⁡x∈(−90°,90°)\arctan x \in (-90°, 90°) for any xx. The two-argument atan2⁡(y,x)\operatorname{atan2}(y, x) returns the polar angle of the point (x,y)(x, y) in (−180°,180°](-180°, 180°].

Worked example

Special angle. sin⁡210°\sin 210°: 210° lies in quadrant III with a reference angle of 30°, and sine is negative there, so sin⁡210°=−1/2\sin 210° = −1/2. Likewise cos⁡135°=−√2/2\cos 135° = −√2/2.

A right triangle. A 4 m ladder leans against a wall at 35° to the ground. The height it reaches is 4×sin⁡35°=4×0.5736≈2.2944 \times \sin 35° = 4 \times 0.5736 \approx 2.294 m.

Back to the angle. A ramp rises 3 m over a run of 4 m. Its angle is arctan⁡(3/4)≈36.8699°\arctan(3/4) \approx 36.8699°.

Direction of a point. For the point (−1,1)(-1, 1), arctan⁡(1/(−1))\arctan(1/(-1)) would give −45°, which points the wrong way. atan2⁡(1,−1)=135°\operatorname{atan2}(1, -1) = 135° correctly places it in quadrant II.

Exact values of the special angles

θ 0° 30° 45° 60° 90°
radians 0 π/6\pi/6 π/4\pi/4 π/3\pi/3 π/2\pi/2
sin⁡θ\sin\theta 0 1/21/2 2/2\sqrt{2}/2 3/2\sqrt{3}/2 1
cos⁡θ\cos\theta 1 3/2\sqrt{3}/2 2/2\sqrt{2}/2 1/21/2 0
tan⁡θ\tan\theta 0 3/3\sqrt{3}/3 1 3\sqrt{3} undefined

These come from two triangles: half a square (45°–45°–90°, sides 1,1,21, 1, \sqrt{2}) and half an equilateral triangle (30°–60°–90°, sides 1,3,21, \sqrt{3}, 2). The calculator also knows 15° and 75°, where sin⁡15°=6−24\sin 15° = \frac{\sqrt{6} - \sqrt{2}}{4} and tan⁡15°=2−3\tan 15° = 2 - \sqrt{3}.

Cosine, arcsin and arctan in practice

The cosine gives the horizontal component of a slanted length: a 10 m cable at 60° to the ground covers 10cos⁡60°=510 \cos 60° = 5 m of ground. It is also the key to the law of cosines, c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C, which solves any triangle given two sides and the included angle.

Arcsin answers “which angle has this sine?”. If a 5 m ramp must rise 0.5 m, its angle is arcsin⁡(0.1)≈5.74°\arcsin(0.1) \approx 5.74°. Arctan does the same with a rise and a run: it turns a slope or a percentage grade into an angle, as in the slope calculator. Remember that inverse functions return only one angle: sin⁡150°\sin 150° is also 1/21/2, but arcsin⁡(1/2)\arcsin(1/2) returns 30°.

Frequently asked questions

Why is tan 90° undefined and not infinite?

tan θ = sin θ / cos θ, and cos 90° = 0. Division by zero has no value. Close to 90° the tangent grows without limit, positive on one side and negative on the other, so no single “infinity” fits. The calculator therefore reports “undefined”.

Should my calculator be in degrees or radians?

Use degrees for everyday angles (construction, navigation, school geometry) and radians for calculus, physics and programming, where sin and cos functions expect radians. sin(30) is 0.5 in degrees but about −0.988 in radians — a classic mistake.

What is the difference between arctan and atan2?

arctan(y/x) only sees the ratio, so the points (1, 1) and (−1, −1) give the same 45°. atan2(y, x) takes the signs of both coordinates into account and returns the true direction, −135° for (−1, −1).

Why does arcsin give an error for 1.5?

The sine of a real angle always lies between −1 and 1, so no angle has a sine of 1.5. The same domain applies to arccos. Arctan, by contrast, accepts any number.

How do I get the cosecant, secant or cotangent?

They are the reciprocals of sine, cosine and tangent: csc θ = 1/sin θ, sec θ = 1/cos θ, cot θ = 1/tan θ. Choose them in the function list, or read them in the table under the result.

Sources

Last updated:

More Math calculators

People also use