Doppler effect calculator
A 440 Hz source approaching at 20 m/s through air at 343 m/s is heard about 6% higher. Add the wave speed and how the source and the observer move to get the observed frequency and its shift. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Emitted source frequency f
- 440
- Wave speed
- 343
- Source velocity
- 20
- Observer velocity
- 0
- Observed frequency
- 467.2445820433
- Frequency shift
- 27.2445820433
- Relative shift
- 0.0619195046
- Ratio
- 1.0619195046
A Doppler effect calculator turns a source frequency, the speed of the wave in the medium, and the line-of-sight speeds of the source and observer into the frequency a listener actually hears or measures. The classical formula used here is f-prime equals f times open parenthesis v plus v-o close parenthesis over open parenthesis v minus v-s close parenthesis, with the standard classroom sign convention that observer velocity is positive when the observer moves toward the source and source velocity is positive when the source moves toward the observer.
What the classical Doppler formula means
For a wave that travels at finite speed through a medium—sound in air is the usual classroom example—the frequency measured by an observer depends on motion of both the source and the observer relative to that medium. If the source emits frequency f and the wave speed is v, the observed frequency is f-prime equals f times the ratio of open parenthesis v plus observer component close parenthesis to open parenthesis v minus source component close parenthesis.
A positive observer velocity means the observer is moving toward the source along the line of sight, which increases the rate at which wavefronts are encountered and therefore raises the observed frequency. A positive source velocity means the source is moving toward the observer, which shortens the wavelength ahead of the source and also raises the observed frequency. When both velocities are zero the ratio is one and there is no shift.
When the source approaches at nearly the wave speed the denominator shrinks and the observed frequency grows without bound; at exact equality the formula is undefined and this tool rejects the input. The opposite motions produce a redshift: lower observed frequency and a negative frequency shift. Teachers care about the wave-speed-zero rejection as much as the arithmetic path, because a student who sets v to zero has left the domain of a propagating-wave model.
The check path recomputes the numerator, denominator, ratio, observed frequency, and shift with the same fixed rounding used for published fields, so a successful response always ships with steps you can assert in tests or worksheets.
Practical tips, limits, and related searches
Keep speeds and frequencies inside the published absolute range so the ratio and products cannot overflow into non-finite results that the solver must reject. Prefer sending numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern.
Use consistent units: if frequency is in hertz and speeds are in meters per second, observed frequency is also in hertz and the shift is in hertz; the formula is homogeneous in the speed unit as long as v, vo, and vs share one system. Prefer this capability when you already have f, v, and the two line-of-sight speeds and only need the classical shift; if your source is a word problem, extract those four numbers first and convert all speeds to the same unit.
What you can do with it
Homework checks for sound Doppler problems
Students enter f, air speed, and the signed source and observer speeds from textbook problems and compare hand-written f-prime and Δf against a deterministic result before submitting.
Pre-flight before signal-processing pipelines
Pipelines compute classical observed frequency and relative shift first, then branch to detection thresholds only when the Doppler regime matches the expected approaching or receding motion.
FAQ
What formula does this Doppler calculator use?
The classical medium-wave formula f' = f · (v + vo) / (v − vs), with vo positive when the observer moves toward the source and vs positive when the source moves toward the observer.
What happens when wave speed is zero?
There is no propagating wave, so the Doppler formula is undefined.
Can source or observer velocity be omitted?
Yes. Both default to zero. Omitting them models a stationary source and observer relative to the medium (no frequency shift when wave speed is nonzero).
Is this the relativistic Doppler effect for light?
No. This is the classical formula for waves in a medium (for example sound). Relativistic light Doppler uses a different expression and does not use a medium rest frame the same way.
Is the Doppler effect calculator free?
The browser tool is free and runs locally.
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/phys/doppler-effect \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"source_frequency":440,"wave_speed":343}'const res = await fetch("https://api.kit.forhosting.com/phys/doppler-effect", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"source_frequency": 440,
"wave_speed": 343
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/doppler-effect",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"source_frequency": 440,
"wave_speed": 343
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/doppler-effect", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"source_frequency":440,"wave_speed":343}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"source_frequency":440,"wave_speed":343}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/doppler-effect", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"source_frequency": 440,
"wave_speed": 343
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.doppler_effect",
"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.
Limits
max_abs | 1000000000000 |
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
When wave speed is zero there is no propagating wave, so the API returns a clear invalid_input error instead of dividing by zero or inventing a limit.
How to call the API and what comes back
Source frequency and wave speed must both be nonzero; values whose absolute value is at or below one times ten to the minus fifteen are treated as zero and rejected. Send a JSON body with two required finite numbers and two optional velocities. Required fields are source_frequency (aliases f, freq, f0, frequency) and wave_speed (aliases v, medium_speed, c, speed). Optional fields are source_velocity (aliases vs, v_source, source_speed) and observer_velocity (aliases vo, v_observer, observer_speed); each defaults to zero when omitted. Absolute values must stay within the published limit of one trillion so intermediate products remain finite in IEEE double precision on the Worker and in the browser. The denominator wave_speed minus source_velocity must also be nonzero. On success the response echoes rounded inputs, sets observed_frequency to f-prime, frequency_shift to f-prime minus f, relative_shift to that difference over f, ratio to the multiplicative factor, formula to the classical string, sign_convention to a one-line reminder of the positive-toward convention, regime to blueshift, redshift, or unchanged, message to a short English summary, and steps to an ordered array of substitution lines. Failed validation—missing fields, non-finite numbers, values outside absolute limits, zero wave speed, zero source frequency, or a zero Doppler denominator—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related searches
When teaching, pair examples: a stationary source and observer with v equals three hundred forty-three and f equals four hundred forty yields zero shift; a source approaching the observer raises f-prime; an observer moving away lowers it; and wave_speed equals zero demonstrates the hard invalid_input path. This landing targets people searching for a Doppler effect calculator, observed frequency, or frequency shift online; it is not a relativistic Doppler tool for light in vacuum, not a weather-radar dual-Doppler processor, and not a full wave-equation solver. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately set wave speed to zero. Round-trip checks are easy: recompute open parenthesis v plus vo close parenthesis over open parenthesis v minus vs close parenthesis by hand, multiply by f, and confirm it equals the published observed_frequency within the same twelve-decimal rounding.
Integration use cases
Unit tests for physics engine helpers
Generate known-good approaching, receding, and stationary cases plus deliberate zero wave-speed rejections for coding kata expected values in game or simulation audio.