Doppler Effect Simulator

See the Doppler effect in action. Move a source and watch its wavefronts bunch up ahead and stretch behind while the observed frequency shifts up and down.

Offline ● Works without internet after loading After the first page load, no network connection is needed.

Controls

Live measurements

Approaching frequency
Receding frequency
Frequency shift
Mach number

Graph

Formula

f' = f × v / (v - vs)

Type your own values to solve the formula. The simulation follows along.

f' Approaching frequency

Observations

    What's happening

    Real-world examples

    Passing ambulance

    The siren sounds higher as it races toward you and drops as it passes, the classic Doppler shift.

    Race car

    A fast car gives a dramatic pitch drop because its speed is a large fraction of the sound speed.

    Police radar

    Radar reads the Doppler shift of the reflected wave to measure a car's speed.

    Redshift

    Light from galaxies moving away is stretched to lower frequencies, the reason distant galaxies look redshifted.

    Common Questions

    What is the Doppler effect?

    The Doppler effect is the change in observed frequency when a wave source and an observer move relative to each other. As a source moves it chases the wavefronts it makes, so they bunch up ahead of it and spread out behind. An observer in front therefore receives a higher frequency, and one behind receives a lower frequency. The source itself never changes what it emits; only the received frequency shifts.

    Why does a siren change pitch as it passes?

    As the ambulance approaches, each wavefront is emitted a little closer to you than the last, so they arrive more often and the pitch is high. Once it passes, each wavefront is emitted a little farther away, so they arrive less often and the pitch drops. The sudden change from high to low as it goes by is the Doppler shift you hear. The source siren stays at one frequency the whole time.

    How do I calculate the Doppler shifted frequency?

    For a moving source and a stationary observer, the observed frequency is f prime = f v / (v minus vs) when the source approaches and f v / (v plus vs) when it recedes, where f is the source frequency, v is the wave speed, and vs is the source speed. To find the observed frequency of a moving source, plug in the speeds and the source frequency. The simulator does this live as you drag the sliders.

    Does the source actually change its frequency?

    No. The source emits the same frequency the whole time. What changes is the spacing of the wavefronts reaching the observer, because the source moves between emitting one crest and the next. This is why the effect depends on the relative motion, not on anything happening inside the source. The simulator shows the source frequency fixed while the observed values shift.

    Why does a faster source give a bigger shift?

    The shift depends on the source speed as a fraction of the wave speed, the Mach number. A faster source moves further between wavefronts, so it squashes them more tightly ahead and stretches them more behind. As the source speed approaches the wave speed the wavefronts ahead pile almost on top of each other, which in the extreme is what produces a sonic boom. The simulator shows the wavefronts crowding as you raise the source speed.

    Does the simulator send my data anywhere?

    No. Everything runs in your browser with a canvas and simple arithmetic. Nothing is uploaded or stored remotely, and the simulator keeps working offline after the page loads.