Phase shift of a sinusoidal function
Get the horizontal shift of a sine graph with its direction: for sin(2x + π) the wave moves π/2 to the left. Amplitude and vertical shift do not change the answer, and a zero B is refused. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- B
- 2
- C
- 3.1415926536
- A
- 3
- D
- 1
- C
- 3.1415926536
- Form
- A*sin(Bx+C)+D
- Phase shift
- -1.5707963268
- Shift amount
- 1.5707963268
When a sine or cosine wave is written y = A sin(Bx + C) + D, the horizontal translation of the graph is the phase shift. Algebra and precalculus courses define that shift as negative C over B: rewrite Bx plus C as B times the quantity x plus C over B to see that the parent sine of Bx is moved by −C/B units. A positive phase shift moves the graph to the right; a negative phase shift moves it to the left; zero means no horizontal translation. Students, tutors, and automated graders need that single number and its direction without also computing amplitude, period, and midline every time.
What phase shift means for y = A sin(Bx + C) + D
A general sinusoidal function stretches vertically by amplitude A, compresses or stretches horizontally by frequency factor B, slides left or right by a phase constant C, and lifts or drops by vertical shift D. Only B and C control the horizontal translation. Factor the argument: Bx plus C equals B times open parenthesis x plus C over B close parenthesis.
Comparing that form to sine of B times open parenthesis x minus h close parenthesis shows that h equals negative C over B. That h is the phase shift reported by textbooks and graphing units: if h is positive the graph of sine of Bx is moved right by h units; if h is negative the graph is moved left by the absolute value of h; if h is zero the wave is not translated horizontally at all.
Amplitude A and vertical shift D never appear in the formula for h, which is why this landing focuses on B and C alone and treats A and D as optional display fields. Search intent clusters around phrases such as phase shift of sinusoidal function, find phase shift of sin Bx plus C, horizontal shift of a sine graph, and phase shift calculator −C/B.
Learners want a concrete signed value and a clear left or right label they can write beside a sketch—not a full four-parameter dump unless they asked for one.
Practical use, limits, pricing, and related parameters
Use the browser tool when you want an immediate phase shift and direction while checking homework, labeling a sine sketch, or confirming a horizontal translation without installing a computer-algebra system. Accepted input is any finite real b and c with b non-zero; optional a and d are finite reals that do not change the phase shift. Results are fully deterministic: the same coefficients always yield the same signed shift and direction label.
There is no language model, no external computer-algebra service, and no randomness, so the capacity is safe to pin in continuous-integration checks and reproducible lesson materials. This page does not compute period, amplitude, or midline by itself—those are separate search intents and separate tools—so you stay on the phase-shift query you typed.
What you can do with it
Homework phase-shift drills
Students enter B and C from y = A sin(Bx + C) + D and confirm the signed shift −C/B plus left, right, or none before sketching the graph.
Tutor and worksheet answer keys
Educators batch coefficient pairs to generate consistent phase-shift and direction answers for quizzes without redoing the algebra by hand.
FAQ
How do I find the phase shift of a sinusoidal function?
For y = A sin(Bx + C) + D, the horizontal phase shift is −C/B.
Does a positive phase shift mean left or right?
Positive phase shift moves the graph to the right; negative moves it to the left; zero means no horizontal shift. The direction field reports right, left, or none.
What happens if B is zero?
Phase shift −C/B is undefined when B is zero; those failed calls are not charged.
Do A and D affect the phase shift?
No. Amplitude A and vertical shift D do not appear in −C/B. They are optional fields echoed for display of the full form only.
Is the phase shift calculator free?
The browser tool runs free on your device.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/trig/sinusoid-phase-shift \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"b":2,"c":3.141592653589793}'const res = await fetch("https://api.kit.forhosting.com/trig/sinusoid-phase-shift", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"b": 2,
"c": 3.141592653589793
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/sinusoid-phase-shift",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"b": 2,
"c": 3.141592653589793
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/sinusoid-phase-shift", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"b":2,"c":3.141592653589793}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"b":2,"c":3.141592653589793}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/sinusoid-phase-shift", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"b": 2,
"c": 3.141592653589793
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.sinusoid_phase_shift",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This capacity accepts finite coefficients B and C (optional A and D for context), rejects a zero B because −C/B is undefined when B vanishes, and returns structured JSON with phase_shift, shift_amount, and direction. Failed validation raises invalid_input and is not charged.
What phase shift means for y = A sin(Bx + C) + D
Delivering phase_shift, shift_amount, and direction as JSON makes the result easy to paste into notes, pin in automated tests, or feed into a larger graphing pipeline without reimplementing the zero-B guard in every language you teach or deploy.
How this calculator validates B and C and reports direction
Edge cases are explicit: b equals two and c equals pi give phase shift negative pi over two and direction left; b equals one half and c equals negative pi give phase shift positive two pi and direction right; b equals three and c equals zero give phase shift zero and direction none. Optional a and d default to one and zero when omitted and are echoed so clients can redisplay the full standard form without a second lookup. Send a JSON body with required fields b and c (aliases B and C are accepted) and optional fields a and d for the amplitude and vertical shift of the full form y equals A sine of Bx plus C plus D. Each coefficient must be a finite number—JSON numbers and numeric strings such as two or negative one half are accepted; words, empty strings, null, infinity, and NaN fail with invalid_input so those failed calls are not charged. If b is exactly zero, the request fails with a clear message: phase shift is negative C over B, which is undefined when B vanishes. On success the engine sets phase_shift to negative c divided by b, shift_amount to the absolute value of that quotient, and direction to right when the signed shift is positive, left when negative, and none when the shift rounds to zero. Results are rounded to twelve decimal places so the same input always yields the same JSON, including for irrational values involving pi.
Practical use, limits, pricing, and related parameters
Each successful request is one billable item at $0.002; failed validation does not consume balance. The response echoes the parsed coefficients, reports form A times sin of Bx plus C plus D, and returns phase_shift, shift_amount, direction, formula phase_shift equals negative C over B, and method phase_shift_neg_c_over_b. Wire the endpoint into unit-circle demos, contest answer checkers, sensor-signal teaching notebooks that start from A-B-C-D coefficients, or floating pipelines where you already prefer explicit domain errors for a zero frequency coefficient over opaque black-box widgets that cannot show why a phase shift failed to compute.
Integration use cases
CI fixtures for graphing helpers
Pipelines freeze JSON goldens for left, right, and zero shifts so a refactor cannot change the horizontal translation silently.