# What is the phase shift?

Phase shift calculator for y = A sin(Bx − C) + D or A cos(Bx − C) + D: the phase shift C/B and its direction, the amplitude, period, frequency, vertical shift, maximum and minimum, with π typed exactly.

- Page: https://www.acalculator.org/math/phase-shift-calculator
- JSON spec: https://www.acalculator.org/math/phase-shift-calculator.json
- Version: 5dda22ce571e

## Default answer

Example with the default inputs (Function A sin(Bx − C) + D, A 3, B 2, C π/2, D 1): The phase shift is π/4 to the right, with amplitude 3, period π and vertical shift 1.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| fn | Function | Sine or cosine: y = A sin(Bx − C) + D or y = A cos(Bx − C) + D. |
| a | A | The number in front of sin or cos; its size is the amplitude. |
| b | B | The number that multiplies x; it sets the period. Type π as π or pi. |
| c | C | The number subtracted from Bx. For sin(2x + π/3), C is −π/3. |
| d | D | The number added at the end; it moves the graph up or down. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| shift | Phase shift | C ÷ B, exactly, with its direction: right when positive, left when negative. |
| shiftValue | Phase shift (decimal) | C ÷ B as a decimal; positive moves the graph right. |
| amplitude | Amplitude | \|A\|: the height of a crest above the midline. |
| period | Period | 2π ÷ \|B\|, exactly. |
| periodValue | Period (decimal) | 2π ÷ \|B\| as a decimal: the length of one full cycle. |
| frequency | Frequency | \|B\| ÷ 2π: cycles per unit of x, 1 ÷ period. |
| verticalShift | Vertical shift (midline) | D: the midline is y = D. |
| max | Maximum | D + \|A\|. |
| min | Minimum | D − \|A\|. |

## Method

y = A sin(Bx − C) + D or A cos(Bx − C) + D: amplitude |A|, period 2π ÷ |B|, phase shift C ÷ B (right when positive, left when negative), vertical shift D, maximum D + |A|, minimum D − |A|.

## Assumptions

- The function is written as A sin(Bx − C) + D or A cos(Bx − C) + D, with B not 0 and A not 0. For Bx + C, type −C.
- x is in radians, so π in B or C is exact; the phase shift and period are in the same units as x.

## Worked examples

1. fn = sin, a = 3, b = 2, c = 0, d = 1 gives amplitude = 3, period = π, periodValue = 3.141593, shift = 0 (no horizontal shift), verticalShift = 1. Source: OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions (y = A sin(Bx − C) + D: amplitude |A|, period 2π/|B|, phase shift C/B, vertical shift D), https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions (retrieved 2026-10-18), Example 5: amplitude 3, period π, no phase shift, midline y = 1.
2. fn = sin, a = 3, b = π/4, c = π/4, d = 0 gives shift = 1 to the right, shiftValue = 1, period = 8, periodValue = 8, amplitude = 3, max = 3, min = -3. Source: OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions (y = A sin(Bx − C) + D: amplitude |A|, period 2π/|B|, phase shift C/B, vertical shift D), https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions (retrieved 2026-10-18), Example 9: amplitude 3, period 8, phase shift 1 unit to the right.
3. fn = cos, a = -2, b = π/2, c = −π, d = 3 gives shift = 2 to the left, shiftValue = -2, period = 4, amplitude = 2, verticalShift = 3, max = 5, min = 1. Source: OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions (y = A sin(Bx − C) + D: amplitude |A|, period 2π/|B|, phase shift C/B, vertical shift D), https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions (retrieved 2026-10-18), Example 10: amplitude 2, period 4, phase shift −2 (2 units left), vertical shift 3.
4. fn = sin, a = 1, b = 1, c = -π/6, d = -2 gives shift = π/6 to the left, shiftValue = -0.523599, period = 2π, verticalShift = -2. Source: OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions (y = A sin(Bx − C) + D: amplitude |A|, period 2π/|B|, phase shift C/B, vertical shift D), https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions (retrieved 2026-10-18), Examples 3 and 4: phase shift π/6 to the left, shifted 2 units down.
5. fn = sin, a = 1, b = pi/6, c = 0, d = 0 gives period = 12, periodValue = 12, frequency = 0.083333. Source: OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions (y = A sin(Bx − C) + D: amplitude |A|, period 2π/|B|, phase shift C/B, vertical shift D), https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions (retrieved 2026-10-18), Example 1: B = π/6, so the period is 2π ÷ (π/6) = 12.
6. fn = cos, a = 0.5, b = 4, c = 1, d = 0 gives shift = 1/4 to the right, shiftValue = 0.25, period = π/2, periodValue = 1.570796. Source: OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions (y = A sin(Bx − C) + D: amplitude |A|, period 2π/|B|, phase shift C/B, vertical shift D), https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions (retrieved 2026-10-18).
7. fn = sin, a = 2, b = π, c = 1, d = 0 gives shift = 1/π to the right, shiftValue = 0.31831, period = 2, frequency = 0.5. Source: OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions (y = A sin(Bx − C) + D: amplitude |A|, period 2π/|B|, phase shift C/B, vertical shift D), https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions (retrieved 2026-10-18).

## FAQ

### How do you calculate the phase shift?

Write the function as y = A sin(Bx − C) + D, then divide C by B. For y = 3 sin(2x − π/2) + 1, the phase shift is (π/2) ÷ 2 = π/4. A positive phase shift moves the graph right; a negative one moves it left.

### How do you find the phase shift when the function has Bx + C?

Rewrite Bx + C as Bx − (−C). For sin(x + π/6), C = −π/6 and B = 1, so the phase shift is −π/6: π/6 to the left.

### How do you find the period of a sine or cosine function?

The period is 2π ÷ |B|. For y = 3 sin(2x) + 1 it is 2π ÷ 2 = π, and for sin((π/4)x) it is 2π ÷ (π/4) = 8.

### What is the amplitude of a sine wave?

The amplitude is |A|, the height of a crest above the midline. For y = −2 cos((π/2)x + π) + 3, the amplitude is 2; the minus sign flips the graph upside down but does not change the amplitude.

### What is the vertical shift?

D, the number added at the end, moves the whole graph up (positive) or down (negative). The midline is y = D, the maximum is D + |A| and the minimum is D − |A|.

### Is the phase shift C or C/B?

C ÷ B. The function A sin(Bx − C) can be written A sin(B(x − C/B)), so the graph of sin(Bx) moves by C/B. For 3 sin((π/4)x − π/4), the shift is (π/4) ÷ (π/4) = 1, not π/4.

## Sources

- OpenStax, Precalculus 2e, §6.1 Graphs of the Sine and Cosine Functions: y = A sin(Bx − C) + D, amplitude |A|, period P = 2π/|B|, phase shift C/B (right for positive, left for negative), vertical shift D; Examples 1, 3, 4, 5, 9 and 10, retrieved 2026-10-18. https://openstax.org/books/precalculus-2e/pages/6-1-graphs-of-the-sine-and-cosine-functions
