How it’s calculated
Any sine or cosine wave can be written as
x is measured in radians, so B and C often contain π. Enter them as multiples of π (for example 0.5 for π/2) to keep the period and phase shift exact. Watch the sign in Bx − C: in cos(2x + π), C = −π.
Example (OpenStax Precalculus 2e, §6.1 Example 10): y = −2 cos(π/2 · x + π) + 3. Here A = −2, B = π/2, C = −π, D = 3. The amplitude is |−2| = 2, the period is 2π ÷ (π/2) = 4, the phase shift is C ÷ B = −π ÷ (π/2) = −2 (2 units left) and the midline is y = 3, so y runs from 1 to 5. A is negative, so the cosine is reflected.
Frequently asked questions
What is the difference between period and frequency?
The period is the length of one full cycle along the x-axis (2π ÷ |B|). The frequency is how many cycles fit in one unit of x, which is 1 ÷ period.
Why is the phase shift C ÷ B and not C?
Factor B out: Bx − C = B(x − C/B). The graph of the basic function is moved C/B units horizontally, so when B ≠ 1 the shift is not simply C.
Can the amplitude be negative?
No. Amplitude is a distance, |A|. A negative A reflects the graph upside down, but its height above the midline is still |A|.
How do I enter π in B or C?
Choose “a multiple of π” and type the number that multiplies π. For π/4 type 0.25; for −π type −1.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator