Sinusoidal Function Calculator

Find the amplitude, period, phase shift, midline and key points of a sine or cosine function, or write the equation from a max, min and period.

Function
pi, pi/4 or decimals
x measured in
Amplitude
3
Period
π
Frequency
0.3183098862cycles per unit of x
Phase shift
π/4right
Midline
y = 1
Maximum
4
Minimum
−2
Range
[−2, 4]
As a cos function
y = 3·cos(2(x − π/2)) + 1
Equationy = 3·sin(2(x − π/4)) + 1

Show the work

  1. Amplitude = |A| = 3.
  2. Period = 2π ÷ |B| = 2π ÷ 2 = π.
  3. Factor out B: Bx − C = B(x − C/B), so the phase shift is C ÷ B = π/4.
  4. Phase shift = π/4 (to the right); vertical shift / midline: y = 1.
−π/60π/6π/3π/22π/35π/6π7π/64π/33π/25π/3−2024

Two periods of the curve. Dashed gold line: the midline. Dots: the five key points of one cycle.

Five key points of one cycle
xyPoint
π/41midline
π/24maximum
3π/41midline
π−2minimum
5π/41midline

A sinusoid is any curve shaped like a sine wave: tides, daylight hours, alternating current, sound and seasonal temperatures all follow one. Four numbers describe it completely — amplitude, period, phase shift and midline. This calculator reads them off an equation, lists the five key points of a cycle and draws two periods, or works the other way and builds the equation from a maximum, a minimum and the period.

How to use the sinusoidal function calculator

  1. Choose Find amplitude, period, phase shift and midline or Write the equation from a maximum, minimum and period.
  2. To analyze, pick sine or cosine and the equation form — A·f(Bx − C) + D or A·f(B(x − C)) + D — then enter A, B, C and D. Expressions such as pi/2 work, and x can be in radians or degrees.
  3. To build, enter the maximum value, the minimum value, the period and an x where a maximum occurs.
  4. Read the equation and its features on the tape, the key points in the table, and the graph with its dashed midline.

Sinusoid formulas

For y = A sin(B(x − h)) + D or the matching cosine:

Feature Formula
Amplitude |A|
Period 2π/|B| (or 360°/|B|)
Frequency |B|/2π cycles per unit
Phase shift h (right if positive)
Midline y = D
Maximum, minimum D + |A|, D − |A|

In the form A sin(Bx − C) + D, the phase shift is h = C/B, not C — the single most common slip with these problems.

Worked examples

Analyze y = 3 sin(2x − π/2) + 1.

Amplitude |3| = 3; period 2π/2 = π; phase shift (π/2) ÷ 2 = π/4 to the right; midline y = 1; maximum 4 and minimum −2.

Key points of one cycle, starting at x = π/4: (π/4, 1) on the midline, (π/2, 4) at the maximum, (3π/4, 1), (π, −2) at the minimum and (5π/4, 1). As a cosine, the same curve is y = 3 cos(2(x − π/2)) + 1.

Build a model for monthly average temperature that peaks at 18 °C in month 7, bottoms out at 4 °C, and repeats every 12 months.

Amplitude (18 − 4)/2 = 7; midline (18 + 4)/2 = 11; B = 2π/12 = π/6. A cosine starts at its peak, so shift it to x = 7: y = 7 cos((π/6)(x − 7)) + 11. The sine version shifts a quarter period (3 months) earlier: y = 7 sin((π/6)(x − 4)) + 11.

Reading the five key points

Each cycle of a sinusoid can be sketched from five evenly spaced points, a quarter period apart:

  • Sine (with positive A) goes midline → maximum → midline → minimum → midline.
  • Cosine (with positive A) goes maximum → midline → minimum → midline → maximum.
  • A negative A swaps maximum and minimum.

Plot those points, join them with a smooth wave, and repeat the pattern to the left and right.

Where sinusoids appear

Situation Typical period
Household AC voltage in the US 1/60 second
Ocean tides (semidiurnal) about 12.4 hours
Daylight hours over a year 365 days
Middle C on a piano about 1/262 second

Real data is rarely a perfect sinusoid, but fitting amplitude, midline and period from the highest and lowest values gives a model that is often good enough for planning and prediction.

To explore all six trig functions with sliders for A, B, C and D, use the trigonometric function graphs. The unit circle calculator explains where the wave shape comes from, and the trigonometric identities checker verifies conversions such as sin u = cos(u − π/2).

Frequently asked questions

How do I find the phase shift of y = A sin(Bx − C) + D?

Factor B out of the argument: Bx − C = B(x − C/B). The phase shift is C/B, to the right when positive. For y = 3 sin(2x − π/2) + 1, the shift is (π/2)/2 = π/4 to the right.

What is the period of a sinusoid?

The length of one full cycle: 2π/|B| in radians or 360°/|B| in degrees. Larger B squeezes more cycles into the same interval.

What do A and D control?

|A| is the amplitude, the distance from the midline to a peak. D is the vertical shift, so the midline is y = D, the maximum is D + |A| and the minimum is D − |A|. A negative A flips the curve upside down.

How do I write an equation from a graph or data?

Read the maximum and minimum: amplitude = (max − min)/2 and midline = (max + min)/2. Measure the period to get B = 2π/period. A cosine starts at a maximum, so shift it to the x-value of any maximum.

Can a sine function be written as a cosine?

Always. sin u = cos(u − π/2), so a sine graph is a cosine graph shifted a quarter period to the right. The calculator gives the equivalent form of every equation.

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