Trigonometric Function Graphs

Plot y = A·f(B(x − C)) + D for any of the six trig functions and read off the amplitude, period, phase shift, range and asymptotes.

x-axis window

y = A · f(B(x − C)) + D

A negative A flips the graph over the midline.
Number or expression, e.g. 3, 1/2, pi/2.
In radians. Positive C shifts right. For sin(Bx − c), C = c/B.
Function
y = 2 sin(2(x − π/4)) + 1
Amplitude
2|A|
Phase shift
π/4 to the rightC = π/4
Vertical shift
1 upmidline y = 1
Range
[−1, 3]
Maximum / minimum
3 / −1
y-intercept
(0, −1)
Frequency
0.3183098862 cycles per unit|B| ÷ 2π
Periodπy = 2 sin(2(x − π/4)) + 1

Show the work

  1. Match y = 2 sin(2(x − π/4)) + 1 to y = A·sin(B(x − C)) + D: A = 2, B = 2, C = π/4, D = 1
  2. Amplitude = |A| = 2: the graph rises and falls 2 units from its midline
  3. Period = 2π ÷ |B| = 2π ÷ 2 = π
  4. Phase shift: C = π/4, so every point moves π/4 to the right
  5. Vertical shift: D = 1, so the midline moves to y = 1
  6. Range: from D − |A| = −1 to D + |A| = 3
−3π/4−π/2−π/40π/4π/23π/4π5π/4−10123

y = 2 sin(2(x − π/4)) + 1 midline y = 1 parent y = sin x start of a cycle (C, f(C))

Every trig graph you meet in precalculus is one of six parent shapes, stretched, squeezed and slid around by four numbers. This tool graphs y = A·f(B(x − C)) + D for sine, cosine, tangent, cosecant, secant or cotangent, draws the midline and vertical asymptotes, and reports the amplitude, period, phase shift, vertical shift, range and y-intercept. A faint dashed copy of the parent graph shows exactly what each transformation did.

How to use the trig function graphs tool

  1. Choose the function f: sin, cos, tan, csc, sec or cot.
  2. Enter A, the vertical stretch. A negative A flips the graph over its midline.
  3. Enter B, which controls the period. Expressions such as 1/2 or pi/2 are fine.
  4. Enter C, the phase shift in radians (pi/4, -1). Positive C moves the graph right.
  5. Enter D, the vertical shift, which moves the midline to y = D.
  6. Pick the x-axis window (two periods around the phase shift, or −2π to 2π) and choose whether to show the parent graph. The marigold dot marks (C, f(C)), where one cycle of the transformed graph begins.

Transformation formulas

y = A · f(B(x − C)) + D
Feature sin, cos tan, cot sec, csc
Amplitude |A| none none
Period 2π ÷ |B| π ÷ |B| 2π ÷ |B|
Phase shift C C C
Midline y = D y = D y = D
Range [D − |A|, D + |A|] all real numbers y ≤ D − |A| or y ≥ D + |A|

Vertical asymptotes come from setting the denominator to zero:

tan, sec: B(x − C) = π/2 + kπ  ·  cot, csc: B(x − C) = kπ

Worked example: y = 2 sin(2(x − π/4)) + 1

Read the parameters. A = 2, B = 2, C = π/4, D = 1.

Amplitude. |A| = 2, so the graph rises and falls 2 units from its midline.

Period. 2π ÷ 2 = π. One full wave fits in an interval of length π.

Shifts. The wave starts its cycle at x = π/4 instead of 0, and the midline moves up to y = 1.

Range and intercept. The values run from 1 − 2 = −1 to 1 + 2 = 3. At x = 0 the inside is 2(−π/4) = −π/2, so y = 2 sin(−π/2) + 1 = −1, giving the y-intercept (0, −1).

For a tangent example, y = tan(2x) has period π/2 and vertical asymptotes at x = π/4 + kπ/2, where k is any integer.

Parent graphs at a glance

Function Period Range Zeros Vertical asymptotes
sin x 2π −1 to 1 x = kπ none
cos x 2π −1 to 1 x = π/2 + kπ none
tan x π all reals x = kπ x = π/2 + kπ
cot x π all reals x = π/2 + kπ x = kπ
sec x 2π y ≤ −1 or y ≥ 1 none x = π/2 + kπ
csc x 2π y ≤ −1 or y ≥ 1 none x = kπ

Secant and cosecant hug the cosine and sine curves: each U-shaped branch touches the wave at its peak or trough and turns away toward an asymptote wherever the wave crosses zero.

Common mistakes

  • Using Bx − c without factoring. In y = cos(3x + π), the shift is −π/3 (left π/3), not π. Factor to cos(3(x + π/3)) before reading C.
  • Treating B as the period. A larger B makes the period shorter. B = 4 gives sine a period of π/2, not 4.
  • Calling a reflection a shift. A negative A flips the graph over the midline; it does not move it. y = −cos x starts at a minimum instead of a maximum.
  • Graphing in degrees by accident. This tool measures x in radians, the convention in algebra and calculus. A period of 2π ≈ 6.28 units corresponds to 360°.

To connect the waves to the circle they come from, see the unit circle calculator; for the graphs of the inverse functions, see inverse trig graphs.

Frequently asked questions

How do I find the period of a trig function?

Divide the parent period by |B|. Sine, cosine, secant and cosecant have a parent period of 2π; tangent and cotangent have π. So y = sin(3x) has period 2π/3 and y = tan(x/2) has period 2π.

What is the phase shift of y = sin(2x − π/2)?

Factor out B first: sin(2x − π/2) = sin(2(x − π/4)). The phase shift is π/4 to the right, not π/2. In general, for sin(Bx − c) the shift is c/B.

Do tangent, secant, cosecant and cotangent have an amplitude?

No. Amplitude is half the distance between the maximum and minimum, and those four functions grow without bound near their asymptotes. The value |A| still stretches them vertically, which the calculator reports as a stretch factor.

Why does the graph break at the asymptotes?

Near an asymptote the function heads to positive infinity on one side and negative infinity on the other, but there is no point at the asymptote itself. Joining the two sides with a line would be wrong, so each branch is drawn separately.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.