Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Trigonometric Function Parameters


How to use
  1. The Function row switches the curve between sin⁡\sin, cos⁡\cos, tan⁡\tan and cot⁡\cot. The general form y=Af(Bx−C)+Dy = Af(Bx - C) + D is the same for all four, so every control keeps working when you switch. Learn more about choosing the function
  2. The equation above the graph restates the current curve, with each number in the colour of the parameter it belongs to: A red, B amber, C violet, D slate. The same four colours label the features on the graph. Learn more about the colour key
  3. The sliders are split into two groups. Outside the function holds AA and DD, which act on the value the function returns and therefore move the curve vertically. Learn more about inside and outside
  4. Drag A to stretch the curve away from its midline. The red bracket on the graph measures ∣A∣|A|, and the two dots mark the maximum D+∣A∣D + |A| and the minimum D−∣A∣D - |A|. Pull AA below zero and the curve reflects across the midline, with the dashed grey curve showing where it came from. Learn more about setting A
  5. Drag D to move the midline. The dashed slate line follows it to y=Dy = D, the maximum and minimum move with it, and the amplitude bracket keeps its length. Learn more about moving the midline
  6. Inside the function holds BB and CC, which act on the input xx and therefore move the curve horizontally. Learn more about inside and outside
  7. Drag B to change how many cycles fit the window. The amber bracket under the curve measures one full period, 2π∣B∣\frac{2\pi}{|B|} for sine and cosine and π∣B∣\frac{\pi}{|B|} for tangent and cotangent. Learn more about setting B
  8. Drag C to shift the curve sideways. It moves in steps of π12\frac{\pi}{12}, and the violet bar at the top of the graph measures the actual displacement, which is CB\frac{C}{B} and not CC. The readout strip prints both numbers side by side so the difference is visible whenever B≠1B \ne 1. Learn more about why the shift is C over B
  9. The Guided walk buttons set all four parameters at once, one idea per button: the general form, amplitude, a negative AA, a doubled BB, the CB\frac{C}{B} trap, a raised midline, all four together, and tangent. The explanation panel follows whichever you press. Learn more about the guided walk
  10. The strip along the bottom reads the current curve back as numbers: amplitude, period, CC itself, the shift CB\frac{C}{B}, the midline, and the maximum and minimum. Each label carries its parameter colour. Learn more about reading the numbers
  11. The Explanations panel on the right names the four letters, then explains whichever one you last touched. Choosing tan⁡\tan or cot⁡\cot switches it to the unbounded case, where amplitude has no meaning because the curve has no peak to measure. Learn more about the explanations panel
  12. The Reset button returns the tool to y=sin⁡xy = \sin x, the baseline every comparison is measured against. Learn more about the baseline wave

y = 1.0 sin(1.00x − 0) + 0.0
y = 1.0 sin(1.00x - 0) + 0.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 0.0A — |A| = 1.0max = D + |A| = 1.0min = D - |A| = -1.0B — period = 2π
Function
Reset
Reads as
amplitude 1.0, period 2π, shift 0, midline 0.0
Outside the function — acts on the output, moves the curve vertically
Aamplitude|A| tall
Dvertical shiftmidline
Inside the function — acts on the input x, moves the curve horizontally
Bperiod2π/|B|
Cphase shiftshift C/B
Guided walk
Amplitude |A|
1.0
Period
2π
C itself
0
Shift C/B
0
Midline D
0.0
Max / min
1.0 / -1.0
Explanations
Aamplitude — half the height, from midline to peak
Bperiod — how many cycles fit the window
Cphase shift — how far sideways, by C/B
Dvertical shift — where the midline sits
y = A f(Bx - C) + D. Four letters, four separate jobs. Move one slider and exactly one feature of the curve responds; each is drawn on the graph in its own colour. Outside the function, A and D act on the value it returns, so they work vertically. Inside, B and C act on the input x, so they work horizontally. Learn more about the general form · the guided walk





Choosing the Function

DemoFunction row and colour key
Step 0 of 5
The Function row offers four buttons — sin⁡\sin, cos⁡\cos, tan⁡\tan and cot⁡\cot. The curve redraws immediately, and every other control keeps its current value, so switching function is a way of asking what the same four parameters do to a different shape.

The general form is the same in all four cases:

y=A f(Bx−C)+Dy = A\,f(Bx - C) + D


What changes with the function is what the parameters can be seen doing. On sin⁡\sin and cos⁡\cos the curve is bounded, so all four features are visible at once: a height, a cycle length, a horizontal displacement and a midline. On tan⁡\tan and cot⁡\cot the curve runs off the top and bottom of the frame between its asymptotes, so the height stops being measurable while the other three still are.

The two bounded functions differ only in where their cycle starts, which is why the tool marks the maximum and minimum rather than a starting point: those two dots sit in different places for sin⁡\sin and cos⁡\cos, and comparing them is the quickest way to see the quarter-cycle offset between the two graphs.

The Equation Bar and the Colour Key

    Above the graph, the current curve is written out in full — for example y=2.0sin⁡(2.00x−π)+1.0y = 2.0\sin(2.00x - \pi) + 1.0. Each number appears in the colour of the parameter it belongs to, and the same four colours are used everywhere else in the tool:

  • A is red, and labels the amplitude bracket, the maximum dot and the minimum dot.
  • B is amber, and labels the bracket under the curve that spans one period.
  • C is violet, and labels the bar across the top that measures the phase shift.
  • D is slate, and labels the dashed midline.

  • The colour is carried by the slider handle, the number box beside it, the parameter name, and the matching entry in the readout strip. Nothing on the graph is labelled with a bare letter and left for you to match up by guessing.

    This matters most when two numbers in the equation are easy to confuse. The value of CC is printed in violet in the equation, and the violet bar on the graph measures CB\frac{C}{B} — the same colour, deliberately, because the point is that these two violet numbers are not equal unless B=1B = 1.

Setting the Amplitude with A

DemoOutside the function: A and D
Step 0 of 5
The A slider runs from −3-3 to 33 in steps of 0.10.1, and sits in the outside group because AA multiplies the value the function returns.

As you drag it, the red bracket on the curve keeps measuring the distance from the midline to the peak. That distance is ∣A∣|A|, never AA: drag through zero into the negatives and the bracket length continues to grow while the readout keeps showing a positive number.

Three things move together when AA changes. The peak rises to D+∣A∣D + |A| and the trough falls to D−∣A∣D - |A|, both dots relabelling as they go. The midline does not move, because that is DD's job. And the horizontal positions of the crossings do not move either, because AA does nothing to the input.

At A=0A = 0 the curve collapses onto its midline. That is not a defect of the tool but the honest picture: with no vertical stretch left there is no wave, only the constant y=Dy = D.

Negative values are worth a deliberate pass. The dashed grey curve that appears is the positive-AA wave, drawn so the reflection across the midline can be seen rather than asserted.

Two states are worth freezing: a stretched wave at A=3A = 3, and a reflected wave at A=−2A = -2.

Moving the Midline with D

The D slider runs from −3-3 to 33 in steps of 0.10.1 and sits in the outside group beside AA, because DD is added after the function has returned its value.

The dashed slate line is the midline, and it tracks DD exactly. Everything attached to it travels with it: the maximum stays at D+∣A∣D + |A|, the minimum at D−∣A∣D - |A|, and the red amplitude bracket keeps precisely the length it had before, because DD leaves AA alone.

That invariance is the point of having the bracket at all. Raising the midline raises the peak, and a reader who is only watching the peak can easily conclude that the wave grew taller. The bracket does not change length, which settles the question on sight.

The horizontal features ignore DD completely: the period bracket keeps its width and the phase-shift bar keeps its position, since neither depends on anything happening outside the function.

For tan⁡\tan and cot⁡\cot the midline is still drawn and still moves with DD, even though it is no longer halfway between a maximum and a minimum — there are none. It marks the height the branches pass through.

The frozen case is a raised midline, where D=2D = 2 and the amplitude bracket is unchanged.

Setting the Period with B

DemoInside the function: B and C
Step 0 of 5
The B slider runs from 0.250.25 to 44 in steps of 0.250.25 and belongs to the inside group, because BB multiplies xx before the function is applied.

The amber bracket beneath the curve spans one complete cycle, and its printed length is the period:

T=2π∣B∣T = \frac{2\pi}{|B|}


for sin⁡\sin and cos⁡\cos, and π∣B∣\frac{\pi}{|B|} for tan⁡\tan and cot⁡\cot. The window is fixed at [−2π,2π][-2\pi, 2\pi], so raising BB visibly packs more cycles into the same span while the bracket shrinks to match.

Two readings are worth making deliberately. At B=2B = 2 the bracket is π\pi wide and exactly two cycles fill the interval [0,2π][0, 2\pi]. At B=0.25B = 0.25 the bracket is 8π8\pi wide, wider than the window itself, so the bracket disappears and a single slow cycle stretches past both edges — the tool draws no bracket it cannot fit, rather than drawing a misleading one.

Nothing vertical responds. The amplitude bracket keeps its length and the midline holds its height, because BB acts only on the input.

The frozen case is a doubled frequency, where B=2B = 2 halves the period to pipi.

Shifting with C, and Why the Shift Is C Over B

The C slider moves in steps of π12\frac{\pi}{12} from −2π-2\pi to 2π2\pi, and its number box reads in multiples of π\pi rather than in decimals.

The violet bar across the top of the graph measures the displacement of the curve from the origin. That displacement is:

phase shift=CB\text{phase shift} = \frac{C}{B}


and it is the single most common place to go wrong. Set B=2B = 2 and C=πC = \pi: the equation bar shows π\pi in violet, the bar on the graph measures 0.5π0.5\pi, and the readout strip prints both, side by side, under the labels C itself and Shift C/B.

The reason is visible in the algebra: the standard cycle begins where the argument is zero, so Bx−C=0Bx - C = 0 gives x=CBx = \frac{C}{B}. The bigger BB is, the less far the curve has to travel for the argument to catch up.

Leave B=1B = 1 and the two numbers agree, which is exactly why the error survives so long — every example with B=1B = 1 confirms the wrong rule as loudly as the right one.

The frozen case is a shifted wave, the one place where CC and the shift are different numbers.

The Guided Walk

DemoGuided walk and explanations panel
Step 0 of 5
    The eight Guided walk buttons each set all four parameters at once and point the explanation panel at one idea. They are meant to be pressed in order, but any of them can be taken alone.

  • form — the baseline y=sin⁡xy = \sin x, every parameter at its neutral value.
  • A = 3 — a vertical stretch with nothing else touched.
  • A < 0 — the reflection across the midline, with the dashed ghost of the positive wave.
  • B = 2 — two cycles where there was one, the bracket halving to π\pi.
  • C/B — B=2B = 2 with C=πC = \pi, the case where the shift and CC differ.
  • D = 2 — the midline raised, the amplitude bracket unchanged.
  • all four — y=2sin⁡(2x−π)+1y = 2\sin(2x - \pi) + 1, every parameter away from neutral at once.
  • tan — the unbounded case, where amplitude stops being defined.

  • Pressing a walk button clears the free-exploration state; moving any slider afterwards releases it again, so the walk is a set of starting points rather than a mode you have to leave.

    The walk starts from the baseline wave and ends at all four at once.

Reading the Curve Back as Numbers

The strip along the bottom of the controls states the current curve as six quantities, each in its parameter's colour: amplitude, period, C itself, the shift, the midline, and the maximum and minimum as a pair.

It exists so that the tool can be run backwards. Reading a graph means recovering these numbers from the picture, and the standard order is midline first, then amplitude, then period, then phase shift:

D=max+min2∣A∣=max−min2D = \frac{\text{max} + \text{min}}{2} \qquad |A| = \frac{\text{max} - \text{min}}{2}


Both readings are on screen at once — the dots give the maximum and minimum, the strip gives DD and ∣A∣|A| — so a guess can be checked immediately rather than at the end of a worked exercise.

Two entries are deliberately redundant. C itself and Shift C/B would be one column in a tidier layout, and are two here because the difference between them is the thing most often lost. For tan⁡\tan and cot⁡\cot the amplitude entry reads none and the maximum and minimum read unbounded, rather than printing a number that would not mean anything.

The Explanations Panel

The panel on the right of the tool has two parts. The top is a fixed legend naming the four letters in their colours — A amplitude, B period, C phase shift, D vertical shift — each with a one-line gloss of what it controls. The letter you last touched is set in bold, so the legend doubles as a reminder of where your attention was.

Below the legend is the explanation itself, and it follows you. Drag a slider and the panel switches to that parameter; press a guided walk button and it switches to the idea that button demonstrates. Choose an an or cotcot and it switches to the unbounded case, whatever you touched before, because on those functions the amplitude explanation would be describing something that does not exist.

Every explanation ends with two links into this page: one to the frozen state that shows the idea, one to the section that explains the control. Two short red notes can also appear under the explanation. One says the curve is reflected, when AA is negative; the other prints CC beside rac{C}{B} whenever the two differ. They stay visible while you work on something else, so a negative AA or a shift that is not equal to CC never goes unnoticed.

Inside and Outside the Function

The four parameters are not four unrelated knobs. They divide cleanly in two, and the division is structural rather than a convention of notation.

BB and CC sit inside the function, acting on xx before sin⁡\sin or tan⁡\tan ever sees it. Whatever they do, they do to the input axis: BB rescales it and CC slides it. AA and DD sit outside, acting on the number the function has already returned: AA rescales that value and DD adds to it.

Everything else follows from this. Amplitude and midline are vertical because they come from outside operations. Period and phase shift are horizontal because they come from inside ones. The two groups never interfere: dragging BB cannot change the height of a peak, and dragging AA cannot move a zero crossing sideways.

The inside operations also explain their own arithmetic. An inside factor of BB compresses the axis by BB, which is why the period is divided by ∣B∣|B| and why the displacement produced by CC is likewise divided by BB. The same reasoning applies to any function of xx, not only to the trigonometric ones — this is the general theory of function transformations, seen on a curve where all four effects are visible at once.

Why Tangent and Cotangent Have No Amplitude

Amplitude is defined as half the distance between the maximum and the minimum. Tangent and cotangent have neither: between consecutive asymptotes the branch runs from −∞-\infty to ∞\infty, so there is no highest point to measure from and no lowest one to measure to.

The tool says so rather than hiding the controls. On tan⁡\tan and cot⁡\cot, the amplitude readout reads none, the maximum and minimum read unbounded, the red bracket is not drawn, and the explanation panel switches to the unbounded case.

AA itself still works, and still does something worth watching: it scales every value of the function by the same factor, steepening or flattening the branches. What it no longer does is set a height, because there is no height. A negative AA still reflects the branches across the midline, which for tangent turns a rising branch into a falling one — the shape of cotangent, though not cotangent itself, since the asymptotes stay where tangent's are.

The period also halves relative to the bounded case. Tangent repeats every π\pi rather than every 2π2\pi, so its period is π∣B∣\frac{\pi}{|B|}, and the amber bracket is correspondingly narrower at the same value of BB.

The frozen case is the tangent case, where the amplitude bracket is absent by design.

From a Graph Back to an Equation

The reverse problem — given a drawn curve, write its equation — uses exactly the quantities this tool displays, in a fixed order.

Read the midline first, as the horizontal line halfway between the highest and lowest points; that is DD. Read the amplitude next, as the distance from that line to a peak; that is ∣A∣|A|, with the sign decided by whether the curve leaves the midline upward or downward. Read the period third, as the horizontal distance covered by one complete cycle, and convert it with B=2πTB = \frac{2\pi}{T}. Read the phase shift last, by finding where a standard cycle begins, and recover CC from C=B×shiftC = B \times \text{shift} — the step where the division by BB has to be undone rather than forgotten.

This tool supports the practice rather than performing it: set the four sliders to your reading and compare the curve you get with the curve you were given. If they differ, the readout strip shows which of the four quantities disagrees.

The worked procedure, and the key-point method for drawing such a curve by hand, are treated on the trigonometric graphs lesson page.

The Baseline Wave

Every comparison in this tool is measured against one curve: y=sinxy = sin x, with A=1A = 1, B=1B = 1, C=0C = 0 and D=2D = 2 replaced by D=0D = 0. It is what the Reset button restores and what the first button of the guided walk loads.
y = 1.0 sin(1.00x - 0) + 0.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 0.0A — |A| = 1.0max = D + |A| = 1.0min = D - |A| = -1.0B — period = 2π
y = sin x, the baseline state

Every parameter at its neutral value: amplitude 1, period 2π, no shift, midline on the x-axis. The four annotations name the four features the sliders move.

In this state the midline sits on the xx-axis, the amplitude bracket measures 11, the period bracket spans 2pi2pi, and there is no phase-shift bar at all, because a displacement of zero is not drawn. Each of the states below changes exactly one of those readings, which is what makes them comparable.

A Stretched Wave

Setting A=3A = 3 and leaving everything else alone is the cleanest demonstration that amplitude is a vertical quantity and nothing else.
y = 3.0 sin(1.00x - 0) + 0.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 0.0A — |A| = 3.0max = D + |A| = 3.0min = D - |A| = -3.0B — period = 2π
A = 3, everything else unchanged

The red bracket measures 3 and the dots read max = 3, min = −3. The period bracket and the crossings sit exactly where they did at A = 1, because A acts outside the function.

The peak has climbed to 33 and the trough has fallen to −3-3, so the red bracket now measures 33. Compare the horizontal features with the baseline wave: the period bracket has the same width and the zero crossings sit at the same places. A stretch away from the midline moves no point sideways.

A Reflected Wave

At A=−2A = -2 the tool draws two curves. The solid one is y=−2sinxy = -2sin x; the dashed grey one is y=2sinxy = 2sin x, the wave it is a reflection of.
y = -2.0 sin(1.00x - 0) + 0.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 0.0A — |A| = 2.0max = D + |A| = 2.0min = D - |A| = -2.0B — period = 2π
A = −2, with the positive wave dashed behind it

The solid curve is the dashed one mirrored in the midline. The maximum and minimum dots have traded places, and the amplitude readout stays at |A| = 2, because a distance is never negative.

Read the two together and the rule is visible rather than asserted: every point of one is the mirror image of the other in the midline, the maximum and minimum dots have swapped places, and the amplitude readout stays at ∣A∣=2|A| = 2. The sign of AA decides which way the curve leaves the midline; the size of AA decides how far it goes.

A Doubled Frequency

With B=2B = 2 the input axis is compressed by a factor of two, which is the whole content of the period formula T = rac{2\pi}{|B|}.
y = 1.0 sin(2.00x - 0) + 0.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 0.0A — |A| = 1.0max = D + |A| = 1.0min = D - |A| = -1.0B — period = π
B = 2, the period halved

One cycle now spans π instead of 2π, so two cycles fill the interval that held one. The amplitude bracket is the same length as before: an inside factor rescales the horizontal axis only.

The amber bracket is now pipi wide instead of 2pi2pi, and two complete cycles fit in the interval that previously held one. Nothing vertical has moved: the bracket measuring ∣A∣|A| is the same length as in the baseline wave, and the midline has not shifted. An inside factor rescales the horizontal axis only.

A Shifted Wave

This is the state the whole tool exists for. Here B=2B = 2 and C=piC = pi, so the equation bar prints pipi while the violet bar on the graph measures rac{pi}{2} — the phase shift is rac{C}{B}.
y = 1.0 sin(2.00x - π) + 0.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 0.0A — |A| = 1.0max = D + |A| = 1.0min = D - |A| = -1.0B — period = πC — shift C/B = 0.5π
B = 2 and C = π, so the shift is π/2

The equation carries C = π while the violet bar measures π/2. The standard cycle begins where Bx − C = 0, which is x = C/B — the division by B is the step most often skipped.

The two violet numbers in the readout strip, C itself and Shift C/B, are deliberately printed side by side in this state. The curve begins its standard cycle where the argument Bx−CBx - C is zero, which is x = rac{\pi}{2}, and the bar measures from the origin to exactly that point. Set BB back to 11 and the two numbers coincide again.

A Raised Midline

At D=2D = 2 the entire curve moves up by two units, which is all a vertical shift does.
y = 1.0 sin(1.00x - 0) + 2.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 2.0A — |A| = 1.0max = D + |A| = 3.0min = D - |A| = 1.0B — period = 2π
D = 2, the midline lifted

The dashed midline has moved to y = 2 and carried the maximum and minimum with it, to 3 and 1. The amplitude bracket has not changed length, which is how you tell a lift from a stretch.

The dashed slate line has moved to y=2y = 2, the maximum reads 33 and the minimum reads 11, both still exactly ∣A∣|A| away from the midline. The red bracket is the check: it has the same length it had in the baseline wave, so the wave was lifted, not stretched. The period bracket and the crossings are untouched.

All Four at Once

The state y=2sin(2x−pi)+1y = 2sin(2x - pi) + 1 puts every parameter away from its neutral value at the same time, which is how sinusoids actually arrive in problems.
y = 2.0 sin(2.00x - π) + 1.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 1.0A — |A| = 2.0max = D + |A| = 3.0min = D - |A| = -1.0B — period = πC — shift C/B = 0.5π
y = 2 sin(2x − π) + 1

All four parameters away from neutral at once. Each annotation still reports one parameter: amplitude 2, period π, shift π/2, midline 1, with the peak at 3 and the trough at −1.

Each annotation still reports its own parameter and nothing else: the red bracket measures 22, the amber bracket spans π\pi, the violet bar measures rac{\pi}{2}, and the dashed midline sits at y=1y = 1, with the peak at 33 and the trough at −1-1. Reading them in the order midline, amplitude, period, shift is exactly the procedure described in reading the curve back as numbers.

The Tangent Case

Switching the function to an an keeps the same four sliders and drops one annotation, because amplitude has no meaning for an unbounded curve.
y = 1.0 tan(1.00x - 0) + 0.0-2π-3π/2-π-π/20π/2π3π/22πD — midline y = 0.0B — period = π
y = tan x, the unbounded case

No amplitude bracket and no maximum or minimum dots, because the branches run to infinity between the dashed asymptotes. The period bracket survives and spans π, half the sine and cosine value.

There is no red bracket and there are no maximum or minimum dots — there is nothing to measure them against. The dashed red lines are the asymptotes, and between any two of them the branch covers every real value. What survives is the amber bracket, now spanning pipi rather than 2pi2pi, the midline, and the phase-shift bar. The readout strip states the absence in words, printing none for amplitude and unbounded for the maximum and minimum.