Understanding the phase shift calculator — concept and principle
This calculator reads a sine or cosine function in the form y = A·sin(Bx − C) + D or y = A·cos(Bx − C) + D and gives its phase shift, amplitude, period, frequency, midline, maximum and minimum. Use it for precalculus and trigonometry homework, for sketching graphs, and for modelling waves, tides, sound or alternating current.
How it is calculated
- Phase shift = C ÷ B (positive = right, negative = left)
- Amplitude = |A|
- Period = 2π ÷ |B| in radians, or 360° ÷ |B| in degrees
- Frequency = 1 ÷ period (cycles per unit of x)
- Midline y = D; maximum D + |A|; minimum D − |A|
The page also shows the shift as a multiple of π, as a fraction of the period, and reduced to the range from 0 to one period.
The principle
Start from y = sin x. Multiplying the input by B squeezes the graph horizontally, so one cycle takes 2π ÷ |B| instead of 2π. Factor the inside as B(x − C/B): the graph of sin(Bx) is moved by C/B units, because the curve now reaches the value it had at x = 0 when x = C/B. A scales the height (amplitude) and D lifts the whole curve so the midline is at y = D. Since sine and cosine repeat every period, adding or subtracting whole periods to the shift gives the same graph.
Worked example
Default inputs: sine, A = 2, B = 3, C = 1.5, D = −1, radians.
- Function: y = 2·sin(3x − 1.5) − 1.
- Phase shift = 1.5 ÷ 3 = 0.5, to the right.
- Amplitude = 2; period = 2π ÷ 3 ≈ 2.0944; frequency ≈ 0.477465.
- Midline y = −1; maximum −1 + 2 = 1; minimum −1 − 2 = −3.
- As a multiple of π: 0.5 ÷ π ≈ 0.159155; as a fraction of the period: 0.5 ÷ 2.0944 ≈ 0.2387.
| B (frequency factor) | Phase shift C ÷ B |
|---|---|
| 0.75 | 2 |
| 1.5 | 1 |
| 2.25 | 0.666667 |
| 3 | 0.5 |
| 3.75 | 0.4 |
| 4.5 | 0.333333 |
| 6 | 0.25 |
How to read the result
A shift of 0.5 means every feature of sin(3x) — zero crossings, peaks, troughs — happens 0.5 units later. The fraction of the period is useful for comparing two waves: 0.25 of a period is a quarter-cycle lag (90°). If the shift is larger than the period, the reduced value describes the same graph more simply.
Common mistakes
- Reading the shift as C instead of C ÷ B.
- Getting the sign wrong: sin(2x + 1) has C = −1, so the shift is −0.5 (left).
- Mixing degrees and radians between B and the period.
- Confusing the phase shift with the vertical shift D.
Frequently asked questions
Is a positive phase shift to the left or right?
In the form Bx − C, a positive C ÷ B moves the graph to the right.
What is the phase shift of cos x compared with sin x?
cos x = sin(x + π/2), so cosine is sine shifted π/2 to the left.
Does the amplitude affect the phase shift?
No. A changes height only; the shift depends on B and C.
Sources: OpenStax, Precalculus 2e (2021), §6.1 Graphs of the Sine and Cosine Functions