Functions & Graphs

How to Graph Sine, Cosine and Tangent

Short answer: Choose radians or degrees before you plot. In radians, sin x and cos x have amplitude 1 and period 2π, so a window from about −2π to 2π shows two full cycles. tan x has period π and vertical asymptotes at x = π/2 + kπ, where the graph must not be joined.

Sine and cosine curves from −2π to 2π in radians, with the x-axis marked in multiples of π/2.

Trigonometric graphs are waves. They are easy to plot once you know two things: which angle unit you are using, and what one cycle looks like.

Step 1: choose the angle mode

Our graphing calculator uses radians by default. The x-axis then measures angles in radians: π ≈ 3.14 is half a turn and 2π ≈ 6.28 is a full turn. Switch to Degrees above the function list if your question uses degrees — then a full turn is 360.

The same expression gives a very different graph in each mode, because sin(x) reads x in whichever unit is selected. The degrees vs radians guide explains the conversion.

Step 2: plot sine and cosine

Type sin(x) as y₁ and cos(x) as y₂. A window from about −2π to 2π (−6.3 to 6.3) shows two complete cycles of each.

Plot sin x and cos x from −2π to 2π →

Key features in radians:

Sine and cosine at a glance (radians)
Featurey = sin xy = cos x
Value at x = 001
Maximum1 at x = π/21 at x = 0
Minimum−1 at x = 3π/2−1 at x = π
Rootsx = kπx = π/2 + kπ
Amplitude11
Period2π2π

Cosine is the sine curve shifted left by π/2: cos x = sin(x + π/2).

Amplitude and period

y = sin x in radians with an arrow showing amplitude 1 and an arrow showing period 2π between two peaks.
Amplitude is the height from the centre line to a peak (1 for sin x). Period is the horizontal length of one complete cycle (2π for sin x).
  • Amplitude = distance from the centre line to a peak. For y = a sin x it is |a|, so y = 3 sin x reaches 3 and −3.
  • Period = length of one cycle. For y = sin(bx) it is 2π ÷ |b| in radians, so y = sin(2x) repeats every π.

Try 3sin(x) and sin(2x) alongside sin(x) to see both changes.

Compare sin x, 3 sin x and sin 2x →

Step 3: tangent and its asymptotes

tan x = sin x ÷ cos x, so it is undefined wherever cos x = 0: at x = π/2 + kπ (…, −π/2, π/2, 3π/2, …). Near these values the graph shoots towards +∞ on one side and −∞ on the other. These are vertical asymptotes.

y = tan x drawn as separate branches with dashed vertical asymptotes at −π/2, π/2 and 3π/2.
The tangent graph is a set of separate branches. A correct plot leaves a gap at each asymptote.

A common plotting fault is a near-vertical line joining one branch to the next. That line is not part of the graph. Our calculator checks every step for a jump and breaks the curve there, so tan x appears as separate branches. tan x has period π, not 2π.

Plot tan x and look for the gaps →

Graphing in degrees

Choose Degrees, type sin(x), and set the window to about −360 to 360 for x and −1.5 to 1.5 for y. The shape is identical; only the x-axis numbers change. In degree mode the period of sin x is 360 and tan x is undefined at 90, 270 and so on.

If you forget to widen the window after switching to degrees, −10 to 10 shows only a tiny piece of a wave that looks almost straight.

Plot sin x in degrees from −360 to 360 →

Checking exact values

Use Evaluate f(x):

  • Radians: sin(π/2) = 1, cos(π) = −1. You can type pi/2 as the x value.
  • Degrees: sin(30) = 0.5, cos(60) = 0.5.

Common mistakes

Watch for these
  • Plotting in the wrong mode. A degree question graphed in radians gives the wrong wavelength.
  • Joining tangent branches across an asymptote.
  • Reading the period of tan x as 2π. It is π.
  • Writing sin x^2. Use sin(x)^2 for (sin x)² or sin(x^2) for sin(x²).

Common questions

Does the calculator mark π on the axis?

Axis numbers are decimals (3.14 rather than π). The guide graphics use π labels. Use a window of about ±6.3 for two cycles in radians.

Can I graph sec, cosec or cot?

Type them as reciprocals: 1/cos(x), 1/sin(x) and cos(x)/sin(x). The same pole handling applies.

How this guide was made: drafted with AI assistance under the site’s editorial policy. Worked examples and plotted figures are computed by the same maths engine as our calculators and checked by automated tests. Found an error? Report a correction.

The two branches of y = 1/x with dashed asymptotes along x = 0 and y = 0.
Functions & Graphs

Rational Graphs and Asymptotes Explained

y = 1/x has two branches, an excluded value at x = 0 and two asymptotes. See valid points, the gap, and the plotting error to avoid.

Updated 3 min read