The Doppler effect describes how the observed frequency of a wave changes when there is relative motion between the source and the observer. This Doppler effect calculator and simulator lets you adjust the source speed, observer speed, and wave speed, then watch wavefronts move in time to see how the pitch (frequency) shifts.
This tool is aimed at physics students, instructors, and anyone curious about sound and waves. By combining a numerical calculator with an animation and CSV data export, it helps connect the abstract formula for the Doppler effect to concrete, visual behavior.
The controls above correspond to standard symbols used in Doppler effect formulas for sound in a medium:
Use realistic ranges for the speeds. Human-scale motions are usually in the range of a few to a few tens of meters per second, while the sound speed in air is a few hundred meters per second.
When both the source and observer can move through a medium with wave speed v, a common non-relativistic Doppler effect formula for the observed frequency is:
In more conventional notation, this is often written as:
f_obs = f₀ × (v + v₀) / (v − vₛ)
where:
The simulator uses this relationship (or an equivalent sign-convention form) at each time step to update the observed frequency as the source and observer move.
When you press Play, the calculator emits wavefronts from the moving source at intervals based on f₀. The observer encounters these wavefronts at a rate that depends on both its own motion and the motion of the source.
The CSV download typically includes time-stamped data describing the positions of the source and observer and the corresponding observed frequency. You can open it in a spreadsheet or plotting tool to graph how the frequency changes with time or position.
Consider a simple scenario with sound in air at room temperature. Set the inputs to:
Using the Doppler formula:
f_obs = 440 × (343 + 0) / (343 − 20)
The denominator is 323, so:
f_obs ≈ 440 × 343 / 323 ≈ 440 × 1.062 ≈ 468 Hz
In the simulation, the wavefronts in front of the moving source bunch together. At the observer’s location, wavefronts arrive more frequently than they were emitted, corresponding to an observed pitch of about 468 Hz, slightly higher than the original 440 Hz.
If you change the sign of vₛ so the source moves away from the observer (vₛ = −20 m/s), the formula becomes:
f_obs = 440 × (343 + 0) / (343 − (−20)) = 440 × 343 / 363 ≈ 416 Hz
Now the observer hears a lower pitch, and the animation shows wavefronts spreading out behind the retreating source.
The table below summarizes how different combinations of source and observer motion affect the observed frequency, assuming modest speeds compared to the wave speed.
| Scenario | Settings (qualitative) | Observed frequency vs f₀ | What you should see |
|---|---|---|---|
| Stationary source and observer | vₛ = 0, v₀ = 0 | f_obs = f₀ | Evenly spaced wavefronts, no change in pitch over time. |
| Source approaching observer | vₛ > 0 toward observer, v₀ = 0 | f_obs > f₀ | Wavefronts compressed in front of the source, higher pitch for the observer. |
| Observer approaching source | vₛ = 0, v₀ > 0 toward source | f_obs > f₀ | Observer passes through wavefronts more often, similar pitch increase to a moving source case. |
| Source and observer separating | vₛ and v₀ moving away from each other | f_obs < f₀ | Wavefront spacing at the observer increases, pitch gradually drops. |
| Source and observer moving together in same direction | Both moving right, similar speeds | f_obs can be slightly higher or lower, depending on relative speed | Wavefront pattern drifts with them; only relative speed along the line between them matters. |
To keep the Doppler effect calculator simple and fast, several physical assumptions are built into the model:
Because of these simplifications, the calculator is excellent for introductory physics, acoustics demonstrations, and conceptual exploration, but it should not be used for precise engineering design or for high-speed scenarios where relativistic corrections become important.
The Doppler effect shapes the sound of a passing siren, the color of distant galaxies, and the precision of weather radar. When source and observer move relative to the medium that carries waves, the spacing of successive wave crests changes. Ahead of the motion, crests bunch together and the perceived frequency rises; behind the motion, crests spread apart and pitch drops. This simulator keeps the familiar goal of computing the observed frequency but augments it with a canvas that shows each wavefront racing through space. As you alter source speed, observer speed, or wave speed, new circular ripples radiate outward and sweep across the observer icon. Every impact updates striped bars that compare the emitted and received frequencies, while a caption narrates the event for screen‑reader users. The animation transforms a single equation into a visceral demonstration of relative motion.
The model treats waves propagating in a uniform medium at speed . The source emits at frequency and moves with velocity along the horizontal axis. The observer travels with velocity . Positive velocities point to the right, so a positive indicates the source chasing the observer. At each emission time the wavefront remains centered on the source’s position at that moment; subsequent motion of the source does not drag previously emitted ripples. We assume linear acoustics: waves do not interact, and their speed is independent of amplitude. All inputs use SI units—meters, seconds, and hertz. The interface validates entries to ensure finite numbers and to maintain and less than ; otherwise the classic Doppler formula would diverge.
For rectilinear motion in a stationary medium the observed frequency is
derived from the relative spacing of wavefronts. If the observer approaches the source () the numerator increases, raising the frequency. If the source approaches the observer () the denominator decreases, also raising the frequency. In the special case where both move away from each other the fraction drops below one, yielding a lower pitch. The simulation uses this equation only for validation and comparison; the visual model deduces the received frequency directly from time intervals between wavefront arrivals.
The canvas evolves in discrete time steps of size . At each step the source and observer positions advance according to their velocities. A new wavefront is emitted whenever simulated time exceeds the last emission by . Each wavefront stores its center point and emission time. Its radius expands as . When the distance between the observer and a wavefront’s center becomes smaller than the radius, a “hit” occurs. The simulator logs the arrival time to compute the instantaneous period , and the observed frequency is . Because the update is explicit and the speed of waves is constant, the algorithm is unconditionally stable. Nevertheless, large would blur the arrival timing, so the input is clamped between 0.0005 and 0.05 s. The code debounces form changes to avoid excessive recomputation.
Suppose a car horn emits a steady 440 Hz tone while driving toward a stationary observer at 30 m/s in air where m/s. Enter , , , and . Pressing Play shows ripples emanating from the orange source circle that speeds rightward. As each wavefront strikes the blue observer, the result text reports an observed frequency near 482 Hz, matching the analytic prediction: . After the source passes the observer and moves away, the hits grow further apart and the frequency drops to about 404 Hz. The CSV export captures arrival times like 0.89, 1.97, 3.14 s, letting you verify the periods with external tools.
The table contrasts the baseline car-horn scenario with two variants.
| Scenario | vₛ (m/s) | v₀ (m/s) | Analytic f' (Hz) |
|---|---|---|---|
| Baseline | 30 | 0 | 482 |
| Observer approaching | 0 | 20 | 465 |
| Both receding | -25 | -15 | 394 |
The simulator reproduces each value within a fraction of a hertz. You can enter the parameters to confirm the wavefront spacing and observe how the striped bars shrink or grow relative to the source frequency.
The canvas shows a horizontal track with an orange circle for the source and a blue circle for the observer. Concentric white rings represent sound waves expanding at constant speed. When the source or observer moves rightward, they approach one another and the rings crowd on the right side. Keyboard users can focus the canvas and press the space bar to toggle play and pause. The caption beneath the canvas announces current time and the latest observed frequency, while the hidden text fallback mirrors this information for assistive technologies. The striped frequency bars use texture in addition to color, ensuring that viewers with color vision deficiencies perceive the difference.
The simulation assumes a one‑dimensional geometry with the source and observer aligned. Real situations often involve angles or three‑dimensional motion, which require projecting velocities along the line of sight. The medium is treated as static and homogeneous; wind or temperature gradients can alter wave speed and bend paths. Relativistic effects are ignored, so the model breaks down for light or for speeds approaching that of the wave. Numerically, extremely large step sizes reduce timing accuracy, and very long simulations may accumulate floating‑point error in the recorded arrival times.
Future versions could let users drag the source and observer to arbitrary positions, enabling exploration of oblique approaches. Incorporating relativistic Doppler formulas would broaden the tool to astronomical redshifts. A frequency‑spectrum panel could show how broadband signals stretch or compress. Because the script is self‑contained, educators may modify it to illustrate shock waves as speeds approach or to compare Doppler shift with related phenomena like beats.
For deeper study, consult F. S. Crawford’s Waves volume of the Berkeley Physics Course or the Acoustical Society of America Handbook. Astronomical redshift discussions appear in E. Harrison’s Cosmology. Related calculators on this site include the Doppler Broadening Calculator, the Relativistic Doppler Shift Calculator, and the Wavelength–Frequency Converter.
Source frequency
440 Hz
Baseline emitted tone.
Observed frequency
—
Observed versus source ratio
—
Tap thrust controls or press the arrow keys to nudge the observer and keep the observed frequency ratio inside the highlighted window while gusts push the source speed and the medium drifts. Each clean second in band boosts your score and reinforces how fobs = f0(v + vo)/( v − vs ).