Doppler Effect Simulator
See the Doppler effect as wavefronts bunch ahead of a moving source and stretch behind it, with the observed frequency and a shock cone past Mach 1.
Simulator
- Heard approaching f(v + vo)/(v - vs). Steady while the source is still distant, not rising as it comes.
- 652.1 Hz
- Heard receding Defined even above Mach 1, because sound behind a receding source is stretched rather than piled up and arrives in the order it left.
- 405.4 Hz
- Pitch drop The musical size of the swoop as it passes. A whole tone is 2 semitones, an octave is 12.
- 8.23 semitones
- Wavelength ahead (v − vs)/f. Zero means consecutive crests leave from the same place. Negative means the source arrives before its own sound, which is not a wavelength.
- 0.526 m
- Mach number Source speed over wave speed, here 343 m/s. Regime: subsonic.
- 0.233
- Cone half-angle arcsin(1/M), measured from the flight path. Below Mach 1 the wave outruns the source in every direction, so there is no cone.
- no cone
- Heard by the observer
- Emitted
Cite this tool
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
The equation as an image to reuse
What is the Doppler effect formula for sound and light?
For sound, the Doppler effect formula gives the observed frequency f′ when source and observer move relative to the medium: f′ = f · (v + vo) / (v − vs), where v is the wave speed, vo is the observer’s velocity (positive towards the source) and vs is the source’s velocity (positive towards the observer). Approaching raises the pitch and receding lowers it. Light has no medium, so only the relative velocity of source and observer counts, and the relativistic formula is f′ = f · √((1 + β) / (1 − β)), where β is their speed of approach along the line between them as a fraction of the speed of light, negative when they recede. Approach gives a blueshift and recession a redshift.
The pitch is steady, then it drops, then it is steady again
Many people describe a passing siren as rising in pitch as it comes toward them. It does not. Neuhoff and McBeath (1996) confirmed the belief in experiments and, since the frequency does not rise, named the heard rise the Doppler illusion. Watch the graph: the frequency is high and almost flat during the whole approach, then falls steeply over a second or so, then sits low and almost flat as the vehicle recedes.
The reason is geometry rather than acoustics. Only the component of motion along the line of sight shifts the frequency, so both speeds get multiplied by the cosine of the angle between the track and the line joining source and observer. While the source is still far up the road that cosine is very close to 1 and barely changes. It swings through its entire range, from +1 through 0 to −1, only during the short interval when the source is nearby.
That is why the famous swoop is the transition and not the approach, and it is why standing closer to the road makes the drop sharper: a smaller miss distance means the angle sweeps through its range in less time. Set the miss distance to 10 m and then to 300 m and compare the steepness of the graph.
A moving source and a moving observer are not the same thing
This is the part the formula quietly tells you and most explanations skip.
f′ = f(v + v_o)/(v − v_s). The observer speed is in the numerator. The source
speed is in the denominator. They are not interchangeable, and the difference is physical.
A moving source genuinely changes the wave in the medium. Each crest leaves from a point further along than the last, so the crests ahead are packed closer together: the wavelength in the air is actually shorter. Look at the wavefronts in the scene, which is exactly what they are showing.
A moving observer changes nothing about the wave. The crests are where they always were, evenly spaced, and the observer simply runs into them more often. The medium is untouched.
At low speeds the two give nearly identical answers, which is why the distinction is easy to miss. Set both to 30 m/s in air and the results differ by under a percent. Set both to 300 m/s and they diverge completely: a source at 300 m/s nearly reaches the wave speed and the denominator collapses, driving the pitch up enormously, while an observer at 300 m/s merely roughly doubles it. Push the source past 343 m/s and the formula stops having an answer at all, whereas an observer can keep going indefinitely.
What happens at the speed of sound
As the source speed approaches the wave speed, the wavelength ahead of it, (v − v_s)/f, shrinks towards zero. Every crest is emitted from almost exactly where the previous one
was, so they pile up on top of each other. That is the readout going to zero, and it is the
wavefronts in the scene becoming tangent at a single point.
At and just past that speed there is no single frequency to report, and the simulator says so rather than printing a number. An observer ahead of the source hears nothing at all, because the source is keeping pace with its own sound, and then receives the whole accumulated disturbance at once as a pressure jump. A pressure jump is not a tone, and asking what pitch it has is the wrong question.
Beyond the wave speed the source outruns its own sound, and the crests it emitted earlier are
now behind it. Their common tangent is a cone whose half-angle from the flight path is
arcsin(1/M), with M the Mach number. At Mach 1 that is 90 degrees, a
flat front. At Mach 2 it is 30 degrees, and it keeps narrowing as the speed rises.
The cone is the sonic boom, and this clears up a common misconception. The boom is not a one-off event at the instant an aircraft crosses Mach 1. The cone trails the aircraft for as long as it stays supersonic, and you hear a boom when the cone sweeps over you, which can be long after the aircraft has passed overhead and many kilometres from where it went transonic.
Sound behind the source still behaves normally
Notice that the receding frequency is reported at every source speed, including supersonic. It is not an oversight. Sound emitted behind a receding source is stretched rather than compressed, so those crests arrive in the order they left and there is a perfectly well defined frequency.
The receding case has its own limit, and it belongs to the observer rather than the source. If the observer recedes faster than the wave travels, no further crest ever catches up, and there is nothing to hear. That is a different failure from the transonic one, and the model distinguishes them.
Light needs a different formula
The idea carries over to light. The formula does not.
Everything on this page depends on a medium. There is a wave speed measured relative to that medium, and the numerator and denominator can be different precisely because "the source moving" and "the observer moving" are distinguishable states. Light has no medium, so only the relative velocity of source and observer means anything, and the correct expression is the relativistic Doppler formula. It is necessarily symmetric in that relative velocity, and it carries a time-dilation factor that has no counterpart in sound.
At everyday speeds the two agree closely enough that a police radar can be understood with the
acoustic version. At the speeds of distant galaxies they do not. And cosmological redshift is a
third thing again: it comes from space expanding while the light is in flight, not from motion
through space, so neither Doppler formula here describes it. Very distant objects show
redshifts above 1, which the low-speed formula z = v/c would read as faster than
light.
What this model leaves out
The medium is still. A wind changes the effective wave speed along the line of sight and shifts every number here. Wind that changes with height also bends sound toward the ground downwind and away from it upwind, which is one reason distant sound carries better downwind. Temperature does the same: the 343 m/s figure is dry air at 20 °C, and the speed moves by roughly 0.6 m/s per degree, so a cold night is several m/s slower.
The source is a point, the track is straight, and the speed is constant. Nothing here accounts for a vehicle accelerating, cornering, or having any size. There is no attenuation and no spreading loss, so the wavefronts are drawn at equal strength however far they have travelled, whereas real sound falls off with distance and the high frequencies are absorbed faster than the low ones.
There are no reflections, so no echo and no ground bounce, both of which are audible in practice. The treatment is linear acoustics throughout, which is a real limitation near Mach 1: a genuine shock is a nonlinear phenomenon and the model does not attempt it, which is exactly why the approaching frequency is refused inside the transonic band rather than reported as an enormous number.
Common mistakes
- Getting the signs wrong. The most common failure by a wide margin. Here
v_ois positive towards the source andv_sis positive towards the observer, so approaching motion raises the pitch on both counts. Write the convention down before substituting, every time. - Putting the source speed in the numerator. Source in the denominator, observer in the numerator. Swapping them gives an answer that is close at low speed and completely wrong near the wave speed.
- Saying the pitch rises as it approaches. It is high and steady while approaching. The change happens during the pass.
- Thinking the boom happens when the aircraft breaks the sound barrier. The cone trails it continuously. You hear the boom when the cone reaches you.
- Using this formula for light. Use the relativistic one. There is no medium, so the source and observer cases cannot differ.
- Treating the wave speed as a property of the source. It belongs to the medium. Changing the medium changes every result on this page while the source does nothing different.
- Expecting a symmetric graph. Plotted against arrival time it is not, because while the source closes in, each crest has less distance to cover than the one before, so the approach is squeezed into less time than the departure.
Sources
- OpenStax, University Physics Volume 1, section 17.2, Speed of Sound, Table 17.1, for 331 m/s in air at 0 °C and 343 m/s at 20 °C, 1480 m/s in fresh water and 5960 m/s in steel.
- OpenStax, University Physics Volume 1, section 17.7, The Doppler Effect, for the formula, its signs, and a moving source shortening the wavelength where a moving observer does not.
- OpenStax, University Physics Volume 1, section 17.8, Shock Waves, for sin θ = 1/M, and the boom occurring as the shock wave sweeps along the ground rather than as the plane breaks the sound barrier.
- NASA Dryden Flight Research Center, Sonic Booms, fact sheet FS-2003-11-016 DFRC, for the cone making a continuous sonic boom along the full width of its base.
- MacTutor History of Mathematics, Christian Doppler (1803 to 1853), for the paper Doppler presented on 25 May 1842.
- Neuhoff JG and McBeath MK, The Doppler illusion, J Exp Psychol Hum Percept Perform 1996;22:970-985, for the belief that an approaching source rises in pitch, when its frequency does not.
- FHWA, Noise Barrier Design Handbook, section 3.3.3, Atmospheric Effects, for wind bending sound toward the ground downwind and away from it upwind.
- OpenStax, Astronomy 2e, section 27.1, Quasars, for z = v/c at low speed and the relativistic formula, which reads a redshift of 3 as about 88% of the speed of light.
- OpenStax, Astronomy 2e, section 29.2, A Model of the Universe, for light stretched by the stretching of the space it travels through.
- Davis TM and Lineweaver CH, Expanding confusion, arXiv:astro-ph/0310808 (2003), for the special relativistic Doppler reading of cosmological redshifts being ruled out.
Model and assumptions
The method, what it assumes and how accurate it is
- Method
- Exact expression, no time stepping
- Repeatability
- Deterministic. The same link gives the same numbers on any machine.
What it assumes
- Classical Doppler for a wave carried by a medium, so source and observer speeds enter the expression differently.
- The sign convention is stated once and used throughout: observer speed is positive moving towards the source, source speed positive moving towards the observer.
- The readouts take motion along the line joining them, and the pass curve resolves both speeds along the line of sight to an observer a miss distance off the track. The medium itself is still.
Where it stops holding. Source speeds at or above the wave speed, where the denominator vanishes and a shock forms, and anything relativistic, which needs a different formula entirely.
Numerical accuracy
No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.
Common questions
Why does a siren drop in pitch as it passes rather than while approaching?
Because the pitch is steady while the source approaches in a straight line, and steady again once it has gone; the change happens over the short interval when it passes you. Approaching, every wavefront is emitted closer to you than the last, so they arrive bunched and the pitch is high and constant. Once past, they are emitted further away each time and arrive stretched, so the pitch is low and constant. The famous swoop is the transition between the two.
Is a moving source the same as a moving observer?
Not quite, and the formula shows why: the source speed appears in the denominator and the observer speed in the numerator. A moving source physically changes the wavelength in the medium, since each crest leaves from a different place. A moving observer meets unchanged wavelengths at a different rate. The two give almost identical answers at low speeds, but they diverge as the speed approaches the wave speed, where a moving source drives the wavelength towards zero and a moving observer does nothing of the sort.
What happens when the source reaches the speed of sound?
The wavefronts ahead of it pile up on top of one another, because the source keeps pace with the crest it emitted, and the denominator of the formula goes to zero. Past that speed the source outruns its own sound and the wavefronts form a cone behind it whose half-angle is arcsin(1/M), with M the Mach number. That cone is the sonic boom, and it is heard as the cone sweeps over you rather than at the moment the aircraft breaks through.
Does this apply to light as well as sound?
The idea does, the formula does not. Light needs the relativistic Doppler formula, because there is no medium to be moving relative to and only the relative velocity of source and observer means anything. At everyday speeds the two agree closely, which is why a police radar can be understood with the sound version. At the speeds of distant galaxies they do not, and cosmological redshift is a further effect again, coming from expanding space rather than motion through it.