SciencePhysics

Doppler Effect
calculator.

A passing siren drops in pitch and far galaxies look redder: work out both shifts.

How it's worked out

Sound travels through a medium, usually air, so it matters who is moving. A moving source squeezes the waves together on one side. A moving listener meets the same waves more or less often.

f′\displaystyle f'=f×c+voc−vs\displaystyle {}= f \times \frac{c + v_o}{c - v_s}

Here f is the frequency the source sends, c is the speed of sound, v with the small o is your speed toward the source, and v with the small s is the source's speed toward you. Use a negative speed for motion apart. The speed of sound in air is about 343 m/s at 20 °C, and fresh water carries sound at about 1,480 m/s.

Light is different. It needs no medium and every observer measures the same speed for it, so only the speed between you and the source counts. The formula comes from special relativity, and β is the speed divided by the speed of light, positive here when the source approaches.

λ′\displaystyle \lambda'=λ1−β1+β\displaystyle {}= \lambda \sqrt{\frac{1 - \beta}{1 + \beta}}
z\displaystyle z=λ′λ−1\displaystyle {}= \frac{\lambda'}{\lambda} - 1

Redshift z is the stretch as a share of the original wavelength. Positive z means the light got longer, which is a redshift, and negative z is a blueshift. OpenStax writes the same formula with v positive for motion away, so check the sign before you compare with a textbook.

To turn a shift back into a speed, the same rule runs in reverse. Two pitches heard from one spot, before and after a passing source, give its speed without its own frequency, because the unknown frequency cancels when you divide one by the other.

vs\displaystyle v_s=c×fbefore−fafterfbefore+fafter\displaystyle {}= c \times \frac{f_{before} - f_{after}}{f_{before} + f_{after}}

Worked examples

Maya hears an ambulance go by

A siren at 700 Hz comes toward Maya at 30 m/s, about 108 km/h. She hears 767.09 Hz. Once it has passed and is moving away at the same speed, she hears 643.7 Hz.

The rise on approach is 67.09 Hz and the fall on the way out is 56.3 Hz, so the two shifts are not equal. Together they make a drop of 3.04 semitones, roughly three neighboring piano keys.

Open this example in the tool

Jon works out a car's speed from its horn

Jon stands beside a road and matches a car's horn to notes on a phone tuner, about 466 Hz as it comes and 415 Hz as it goes. He does not know the horn's real frequency, and he does not need it.

The speed comes out at 19.86 m/s, which is 71.5 km/h or 44.4 mph. The horn itself sends about 439 Hz. Being one semitone off on the first pitch moves the answer by about 10 m/s, so treat this as a rough check rather than a speed trap.

Open this example in the tool

Priya reads a line in a galaxy's spectrum

Hydrogen gives off a red line at 656.28 nm. In a galaxy moving away at 1,000 km/s, Priya sees it at 658.47 nm, a redshift of z = 0.00334.

At this speed the low-speed estimate, speed divided by the speed of light, gives 0.00334, almost the same. Working backward from her reading returns 1,000 km/s, which matches.

Open this example in the tool

Reading your result

A semitone is a useful size. In air at 343 m/s, a source needs about 19.3 m/s toward you to raise its pitch by one semitone, the step between neighboring piano keys. The Handbook for Acoustic Ecology puts this at about 42 mph. An experiment near the Dutch town of Maarsen in 1845 had trained musicians listen to trumpets on a passing train.

Temperature moves the answer a little. Air at −10 °C carries sound at about 324.9 m/s and air at 30 °C at about 348.7 m/s. The same 30 m/s siren is heard at 771.2 Hz in the cold and 765.9 Hz in the heat, so a difference that small rarely matters outside a lab.

The low-speed estimate fails near light speed. A source moving away at half the speed of light takes a 500 nm line to 866 nm, a z of 0.732. Speed divided by light speed says 0.5, so use the full formula above about a tenth of light speed.

A very large redshift is not a speed through space. For the most distant galaxies, redshift comes mostly from the expansion of space, and astronomers read it with a cosmology model rather than this formula.

Common mistakes

  • Treating a moving listener like a moving source. At 20 m/s, a moving listener hears 740.8 Hz from a 700 Hz siren, while a moving source gives 743.3 Hz. In air the two are not the same.
  • Getting the signs backward. Here a speed is positive toward the other party, in both places. A source moving away takes a negative value, which makes the bottom of the fraction bigger and the pitch lower.
  • Using it past the speed of sound. A source at or above the speed of sound outruns its own waves and piles them into a shock wave, so the calculator refuses that case rather than give a wrong number.
  • Forgetting that only motion along the line counts. A source that passes beside you has a speed along your line of sight that shrinks to zero at the closest point, which is why the pitch slides down rather than jumps.
  • Mixing units. Both speeds and the speed of sound must share a unit in the formula. The boxes here convert for you, so you can mix mph with m/s.

Questions people ask

No. A source heading straight at you at a steady speed keeps a steady, higher pitch. Your ear reads the rising loudness as if the pitch were climbing. The pitch only falls when the source starts to pass and its speed along your line of sight changes.

Sources