Phase Shift Calculator
Enter the four coefficients of your sine or cosine function in the form f(x) = A sin(Bx - C) + D and this calculator instantly finds the phase shift (C/B), amplitude, period and vertical shift. Optionally evaluate f(x) at any point. Results update as you type, with a full show-your-work panel.
What is phase shift?
Phase shift is the horizontal displacement of a sine or cosine wave from its standard starting position. When a trigonometric function is written in the form f(x) = A sin(Bx - C) + D, the graph is shifted C/B units along the x-axis. A positive result means the wave moves to the right, a negative result means it moves to the left. Phase shift appears throughout physics, engineering and signal processing wherever two waves of the same frequency are compared: the difference in their starting positions is expressed as a phase shift, often given in radians or degrees.
How to use this calculator
Enter the four coefficients A, B, C and D for your function, then choose between sine, cosine or tangent. The calculator computes the phase shift (C / B), amplitude (|A|), period (2pi / |B|) and vertical shift (D) instantly. You can also enter an x-value to see the function evaluated at that point. Switch the angle-unit selector to degrees if you prefer results in degrees. The show-your-work panel walks through every step of the calculation with your actual numbers. The chart below plots two full periods of the wave and its midline so you can see the shift visually.
Phase shift formula and worked example
The phase shift formula is: phase shift = C / B. For the function f(x) = 2 sin(3x - 1) + 0, A = 2, B = 3, C = 1 and D = 0. The phase shift is 1 / 3 approximately 0.3333 radians to the right. The amplitude is |2| = 2, the period is 2pi / 3 approximately 2.0944 radians, and the midline sits at y = 0. At x = 0, f(0) = 2 sin(0 - 1) = 2 sin(-1) approximately -1.6829. These are the same defaults this calculator loads with so you can verify all the results at a glance.
Period, amplitude and vertical shift
Although phase shift is the focus here, the other three properties are equally important when analysing a wave. The amplitude (|A|) is the distance from the midline to the peak or trough and determines how tall the wave is. The period (2pi / |B|) is the horizontal length of one complete cycle and controls how quickly the wave repeats. The vertical shift (D) moves the entire wave up or down, setting the midline around which the oscillation occurs. For sine and cosine functions, the range is then [D - |A|, D + |A|]. Tangent functions have no bounded range because they extend to positive and negative infinity at their asymptotes.
Applications of phase shift
Phase shift is used in acoustics to describe the time delay between two sound waves. In electrical engineering, the phase angle between voltage and current in an AC circuit determines whether the circuit is capacitive, inductive or resistive. In signal processing, filters shift the phase of certain frequency components. In optics, the phase difference between two light waves determines whether they interfere constructively or destructively. Understanding how to read the phase shift coefficient directly from the function equation is the first step in all these applications.
Standard form reference: f(x) = A func(Bx - C) + D
| Coefficient | Property controlled | Formula | Effect of sign |
|---|---|---|---|
| A | Amplitude | |A| | Negative A flips the wave vertically |
| B | Period | 2pi / |B| | Larger |B| compresses the wave; smaller stretches it |
| C | Phase shift | C / B | Positive C/B shifts right; negative shifts left |
| D | Vertical shift (midline) | D | Positive D raises midline; negative lowers it |
Each coefficient controls one independent property of the wave. Changing any one leaves the others unaffected.
Frequently asked questions
How do I find the phase shift from an equation?
Write the function in the standard form f(x) = A sin(Bx - C) + D. Once you have identified B and C, divide C by B. The result is the phase shift. If C/B is positive the graph is displaced to the right; if it is negative the graph is displaced to the left. Be careful with the sign convention: the standard form subtracts C, so a function written as sin(2x + 3) has B = 2 and C = -3, giving a phase shift of -3/2 = -1.5 (left shift).
What is the difference between phase shift and vertical shift?
Phase shift is a horizontal displacement along the x-axis, controlled by the C/B ratio. Vertical shift (D) is a displacement up or down along the y-axis and simply raises or lowers the entire wave without affecting its shape. A phase shift changes where the wave starts in its cycle; a vertical shift changes what value the wave oscillates around.
Can the phase shift be negative?
Yes. A negative phase shift means the graph is displaced to the left. For example, if the phase shift equals -pi/4, the wave begins pi/4 radians earlier than the standard sin(x) curve. Whether the shift is left or right depends on the sign of C/B, not just C or B individually.
How does the phase shift formula change for cosine?
The formula is identical: phase shift = C / B for both sine and cosine. The only difference is the shape of the base wave. Because cos(x) = sin(x + pi/2), cosine already looks like a sine that has been shifted left by pi/2. If you need to convert between the two forms, add pi/2 to the phase constant C when switching from cosine to sine notation.
What units is the phase shift in?
Phase shift is naturally expressed in radians because the standard form of the function uses radians. This calculator also lets you display results in degrees by selecting the degrees option. To convert manually, multiply radians by 180 / pi. For example, a phase shift of pi/4 radians equals 45 degrees.
What happens when B equals zero?
If B is zero, the function f(x) = A sin(0 - C) + D collapses to a constant value regardless of x, because sin of a constant is just a number. There is no oscillation, no period, and the concept of phase shift is undefined. This calculator returns no result when B equals zero.