The Doppler Effect for Sound, Explained

After reading this you can predict the pitch an observer hears when a source, an observer, or both move through still air, and you will know exactly when the simple formula stops working.

What the effect is, and one example you have heard

Stand beside a road and listen to a car horn. As the car comes toward you the horn sounds high. The moment it passes and moves away, the pitch drops. The horn never changed. What changed is how the sound waves reach your ear.

A source emitting a steady frequency sends out crests at regular intervals. If the source moves toward you, each new crest is emitted a little closer than the last, so the crests pile up and arrive more often. Higher arrival rate means higher frequency, which your ear reads as higher pitch. Move away and the crests spread out, so the frequency drops.

The Doppler Effect Calculator turns this into a number. Give it a source frequency, the wave speed in the medium, and the speeds of source and observer, and it returns the frequency actually heard.

When to use this formula, and when not to

This calculator handles sound in a medium: waves that travel through air, water, or another material at a fixed speed relative to that medium. The speeds you enter are speeds relative to the medium, not relative to each other. That distinction matters, and it is the source of most mistakes.

Do not use this formula for light or other electromagnetic waves. Light has no medium, and its Doppler shift follows the relativistic formula, where only the relative velocity of source and observer matters. For that case use the Special Relativity Calculator instead.

The classical sound formula treats source speed and observer speed separately because the medium provides a fixed reference. For light there is no medium and no separate roles. Using the sound formula for a radar gun or a redshift will give the wrong answer.

The formula and where each term comes from

Let the source emit frequency f_0. Let the wave travel at speed v in the medium. Let the source move at speed v_s and the observer at speed v_o, both measured along the line joining them. The observed frequency is:

f = f_0 \cdot \frac{v \pm v_o}{v \mp v_s}

The upper signs (+ on top, - on bottom) apply when the two are approaching each other. The lower signs apply when they recede. Here f_0 is the source frequency, v the wave speed, v_o the observer speed, and v_s the source speed.

The numerator and denominator have different physical origins, and that is why they enter differently.

Start with a moving observer and a still source. In one second the observer travels a distance v_o. Moving toward the source, the observer sweeps through extra crests. The waves come at speed v but the observer closes on them at v + v_o, so the effective arrival speed is v + v_o. Divide by the unchanged wavelength \lambda = v / f_0 and you get f = f_0 (v + v_o) / v. That is the numerator.

Now a moving source and a still observer. In one period T = 1/f_0 the source moves v_s T toward you, shortening the wavelength to \lambda' = (v - v_s)/f_0. The waves still travel at v, so the heard frequency is f = v / \lambda' = f_0 v / (v - v_s). That is the denominator. Combine both effects and you have the full formula above.

A worked example that reproduces the demo

A siren at 440 Hz approaching at 30 m/s

Use the demo defaults: source frequency 440 Hz, sound speed 343 m/s, source speed 30 m/s, observer speed 0 m/s, motion set to approaching.

  1. Pick signs for approach: + on the observer term, - on the source term.
  2. Numerator: v + v_o = 343 + 0 = 343 m/s.
  3. Denominator: v - v_s = 343 - 30 = 313 m/s.
  4. Ratio: 343 / 313 = 1.0958.
  5. Observed frequency: f = 440 \times 1.0958 = 482.2 Hz.

The heard pitch rises from 440 Hz to about 482 Hz, a jump of 42 Hz, roughly a musical semitone and a half.

Now let the same siren recede at 30 m/s. Flip the signs on the source term: f = 440 \times 343 / (343 + 30) = 440 \times 0.9196 = 404.7 Hz. The pitch falls to about 405 Hz. The full swing from approaching to receding is 482.2 - 404.7 = 77.5 Hz, and that is the drop you hear as the siren passes.

As a source at 440 Hz passes an observer at 30 m/s in air (343 m/s), the heard frequency starts at about 482 Hz while approaching, holds there until the source is near, then drops through 440 Hz at closest approach to about 405 Hz as it recedes. Faster source speeds make the jump larger and steeper.

Reading and interpreting the result

The heard frequency is the only output, but its ratio to the source frequency tells the whole story. A ratio above 1 means the pitch rose, so the two are closing. Below 1 means they are separating. The ratio equals 1 exactly when there is no net motion along the line between them.

Notice that moving source and moving observer are not symmetric in this formula, even at the same speed. Suppose v = 343 m/s and one party moves at 30 m/s toward the other while the other stands still.

Same 30 m/s approach, two different setups, source 440 Hz
CaseFormulaRatioHeard (Hz)
Source moves343 / 3131.0958482.2
Observer moves373 / 3431.0875478.5

The difference is small at 30 m/s (about 3.7 Hz) but grows fast as speeds rise, because the moving-source case has speed in the denominator while the moving-observer case has it in the numerator.

As the source speed approaches 343 m/s the denominator shrinks toward zero and the heard frequency shoots up. The marker sits at the demo value of 30 m/s.

Where the model breaks down

As the source speed v_s approaches the wave speed v, the denominator v - v_s approaches zero and the predicted frequency runs to infinity. That is not a real infinite pitch. It is the model warning you that the crests are stacking on top of each other. At v_s = v the source keeps pace with its own wavefronts and they merge into a single high-pressure shock front. That is the sonic boom.

Beyond the wave speed the formula returns a negative frequency, which has no physical meaning here. The physics has switched to supersonic flow and Mach cones, which this calculator does not model.

Two other idealizations are baked in. The formula assumes motion straight along the line between source and observer, so for a source passing to one side you must use the component of velocity along the line of sight. It also assumes a still, uniform medium. A tailwind or a temperature gradient changes v and shifts the result.

Common mistakes

The errors below account for most wrong answers.

Mixing up relative and medium-frame speeds
You enter speeds relative to the air, not relative to each other. If both move at 20 m/s in the same direction, they enter as 20 and 20, not as a relative speed of 0.
Swapping the source and observer terms
Observer speed sits in the numerator, source speed in the denominator. Put them the wrong way and the demo gives 478.5 Hz instead of 482.2 Hz.
Getting the sign wrong
Approach raises pitch, recession lowers it. If your ratio comes out on the wrong side of 1, check whether you chose the approach or recede signs consistently in both numerator and denominator.
Using it for light
Radar, redshift, and any electromagnetic source need the relativistic formula, not this one.

If you are combining a Doppler measurement with uncertainties in the measured speeds, the Error Propagation Calculator will carry those errors through to the frequency, and the Percent Error Calculator compares your result against a reference value.

Related tools

The Doppler shift is one member of a larger family of wave and frequency problems on this site. The Photon Energy Calculator links frequency to energy through E = hf, useful once you have shifted a light frequency. The de Broglie Wavelength Calculator assigns a wavelength to a moving particle. For geometric optics rather than wave frequency, see the Snell's Law and Refraction Calculator and the Lens and Mirror Equation Calculator. Two more physics staples round out the set: the Coulomb's Law Calculator and the Radioactive Decay and Half-Life Calculator.

Frequently asked questions

Why is the effect stronger when the source moves than when the observer moves?

Because a moving source changes the wavelength itself, and wavelength sits in the denominator, while a moving observer only changes the rate of encounter with unchanged waves. At 30 m/s the source case gives 482.2 Hz and the observer case 478.5 Hz. The gap widens as speed rises.

What speed should I use for sound in air?

About 343 m/s at 20 degrees C. Sound speed rises roughly 0.6 m/s for every degree Celsius, so on a cold 0 degree day it is closer to 331 m/s, which shifts every heard frequency slightly.

What happens if the source goes faster than sound?

The formula fails. At exactly the wave speed the denominator hits zero and the wavefronts pile into a shock front, the sonic boom. Above that speed the equation returns a meaningless negative frequency.

Does the Doppler shift change how loud the sound is?

No. This formula changes only frequency (pitch). Loudness depends on distance and on the source power, which this model does not track.

Can I use this for an ultrasound blood-flow measurement?

The principle applies, but medical ultrasound reflects sound off moving blood, so the shift happens twice (once at the moving reflector as receiver, once as re-emitter). That doubles the shift compared to a single moving source or observer.