Sine & Cosine Graph Calculator

A sinusoidal graph is a smooth repeating wave described by y = A sin(Bx + C) + D. A sets the height, B the period, C the horizontal shift and D the midline. This calculator works out each of these features, gives the maximum, minimum and range, and draws two full periods of the wave.

Try:

How to use the sine & cosine graph calculator

  1. Choose sine or cosine.
  2. Enter A, B, C and D (π is allowed, e.g. -pi/4).
  3. Press Calculate to see the features and the graph.

Formula

y=Asin⁡(Bx+C)+Dy = A\sin(Bx + C) + D
Period=2π∣B∣\text{Period} = \frac{2\pi}{|B|}

Worked example: y = 3 sin(2x) + 1

  • Function: y = A sin(Bx + C) + D
  • A (amplitude): 3
  • B: 2
  • C: 0
  • D (vertical shift): 1

✓ Answer checked

Amplitude=3,  Period=π,  Phase shift=0,  Midline y=1\text{Amplitude} = 3,\; \text{Period} = \pi,\; \text{Phase shift} = 0,\; \text{Midline } y = 1
Maximum / minimum
4  /  −24 \;/\; -2
Range
[−2,  4][-2,\; 4]
Frequency (cycles per unit)
0.318309890.31830989
1234567−2−11234y = 3 sin(2x + 0) + 1
Two full periods. Orange dashed: midline y = 1. Green dashed lines are one period (3.1416) apart.
Step-by-step working (4 steps)
  1. Amplitude

    The amplitude is |A|: how far the wave goes above and below the midline.

    ∣A∣=3|A| = 3
  2. Period Period = 2π/|B|

    One full cycle of sin or cos is 2π; dividing by |B| squeezes or stretches it.

    2π∣B∣=2π2=π\frac{2\pi}{|B|} = \frac{2\pi}{2} = \pi
  3. Phase shift

    Solve Bx + C = 0: the graph starts its cycle there.

    x=−CB=0x = -\frac{C}{B} = 0
  4. Vertical shift

    D moves the midline up or down.

    y=1y = 1
Formulas used
y=Asin⁡(Bx+C)+Dy = A\sin(Bx + C) + D
Period=2π∣B∣\text{Period} = \frac{2\pi}{|B|}
How this was checked
  • ✓ f(x + period) equals f(x) at several test points.
  • ✓ The sampled graph reaches the predicted maximum and minimum.

Frequently asked questions

What is the period of y = sin(2x)?

π, because the period is 2π ÷ |B| and B = 2.

What does a negative A do?

It reflects the wave upside down. The amplitude is still |A|.

How do I find the phase shift?

Solve Bx + C = 0, giving x = −C ÷ B. A positive answer shifts the graph to the right.

Related calculators

Related guides