How to use the doppler effect calculator
- Enter the source frequency, the pitch the source makes when it is at rest, in hertz.
- Enter the speed of sound. The example value is for air near 20 degrees Celsius.
- Choose the speed unit, then enter the source speed and whether the source moves toward you, away from you or not at all.
- Do the same for the listener, then read the frequency the listener hears, the shift in hertz and cents and the wavelength.
Formula
observed frequency f' = f x (c + v_listener) / (c - v_source)
a listener moving toward the source adds to the top, moving away subtracts
a source moving toward the listener subtracts on the bottom, moving away adds
pitch change in cents = 1200 x log2(f' / f)
c is the speed of sound in the air. All speeds are along the line between the source and the listener. The formula needs the source to move slower than sound.
A siren driving past
A siren sounds at 700 Hz and drives at 30 m/s while sound travels at 343 m/s. Coming toward a standing listener it is heard at 700 x 343 / (343 - 30) = 767.09 Hz, a rise of 67.09 Hz, which is 158.5 cents (a bit more than a musical semitone and a half). As it drives away it is heard at 700 x 343 / (343 + 30) = 643.70 Hz.
If the listener also walks toward the siren at 10 m/s, the pitch heard rises to 700 x (343 + 10) / (343 - 30) = 789.46 Hz. Entering 108 km/h with the speed unit set to kilometers per hour gives the same answers as 30 m/s.
Why the pitch changes
Each wave crest leaves the source from a different position. A source moving toward you crowds the crests together, so they arrive more often and you hear a higher pitch. A source moving away stretches them out. When both source and listener move, the two effects combine, which is why the formula has a term for each.
Using the result
The shift in cents tells you how big the change sounds to a musician, since 100 cents is a semitone. To label the pitch you hear with a note name, use the Note Frequency Converter. The speed of sound depends on temperature, which you can find with the Speed of Sound Calculator.
More waves and light tools
For related tools on sound and light, try the Speed of Sound Calculator, Sabine Reverberation Time Calculator and Thin Lens Calculator.
Assumptions and limits
- Sound travels through still air, with no wind.
- The source and the listener move along the straight line that joins them.
- The source moves slower than the speed of sound, and a listener moving away does too.
- The speed of sound is the same everywhere along the path.
- The frequency, speeds and speed of sound are examples to replace with your own.
Frequently asked questions
Does the Doppler effect work for light?
Yes, in a different form. Light shifts in color when a source moves, but the formula for light does not use a medium like air, so this sound formula should not be used for it.
What happens at the speed of sound?
The formula breaks down because the waves pile up in front of the source and form a shock wave. The tool refuses these cases and explains why.
Why is the shift different coming and going?
The speed of the source appears in the bottom of the fraction, so approaching makes the denominator smaller and the result larger by a bigger step than receding makes it smaller.
Does a moving listener or a moving source matter more?
For the same speed they give slightly different results because of where the speed appears in the formula. For speeds well below the speed of sound the two are almost the same.