What this calculator does
The Doppler effect is the change in the frequency of a wave when the source, the observer, or both are moving relative to the medium carrying the wave. It is why a siren sounds higher as an ambulance approaches and drops in pitch the instant it passes. This calculator applies the classical (non-relativistic) Doppler equation for mechanical waves such as sound in air, water, or steel, and returns the observed frequency, the size of the shift, and both wavelengths.
The formula
With \(f_s\) = source frequency, \(v\) = wave speed in the medium, \(v_o\) = observer speed toward the source, and \(v_s\) = source speed toward the observer:
$$f_{o} = f_{s} \times \frac{v + v_{o}}{v - v_{s}}$$Speeds are signed: use a positive value when the motion closes the gap and a negative value when it opens it. The observed wavelength follows from \(\lambda_o = v / f_o\), while the emitted wavelength is \(\lambda_s = v / f_s\).
A positive shift means the pitch rises (source and observer approaching); a negative shift means the pitch drops (receding). Speeds are measured along the line joining source and observer.
How to use it
Pick a medium preset (or type your own wave speed), enter the frequency the source actually emits, then enter the two speeds along the line joining source and observer. Only the component of velocity along that line matters, so a vehicle passing at its closest point has zero effective speed and no shift at that instant.
Worked example
A train horn emits 1000 Hz and moves toward a stationary listener at 30 m/s through air at 343 m/s:
$$f_{o} = 1000 \times \frac{343 + 0}{343 - 30} = \frac{343000}{313} = 1095.85\,\text{Hz}$$That is a rise of about 95.85 Hz, roughly 9.58 percent, and the wavelength compresses from 0.343 m to 0.313 m.
How the Shift Changes Across Common Scenarios
All rows below use dry air at 20 °C (\(v = 343\) m/s) and a source frequency of \(f_s = 1000\) Hz, with the sign convention of this calculator: \(v_s\) and \(v_o\) are positive when the object moves toward the other one and negative when it moves away.
| Scenario | \(f_s\) (Hz) | \(v\) (m/s) | \(v_s\) (m/s) | \(v_o\) (m/s) | \(f_o\) (Hz) | Shift \(\Delta f\) | Shift (%) |
|---|---|---|---|---|---|---|---|
| Both at rest | 1000 | 343 | 0 | 0 | 1000.00 | 0.00 Hz | 0 % |
| Source approaching at 30 m/s | 1000 | 343 | 30 | 0 | 1095.85 | +95.85 Hz | +9.58 % |
| Source receding at 30 m/s | 1000 | 343 | −30 | 0 | 919.57 | −80.43 Hz | −8.04 % |
| Observer approaching a still source at 30 m/s | 1000 | 343 | 0 | 30 | 1087.46 | +87.46 Hz | +8.75 % |
| Observer receding at 30 m/s | 1000 | 343 | 0 | −30 | 912.54 | −87.46 Hz | −8.75 % |
| Both approaching at 30 m/s (head-on closing at 60 m/s) | 1000 | 343 | 30 | 30 | 1191.69 | +191.69 Hz | +19.17 % |
| Source approaching at 300 m/s (Mach 0.87) | 1000 | 343 | 300 | 0 | 7976.74 | +6976.74 Hz | +697.67 % |
Why rows 2 and 4 do not match
Both describe the same 30 m/s closing speed, yet they give different answers: 1095.85 Hz versus 1087.46 Hz. That is the classical source–observer asymmetry. A moving source changes the denominator, physically compressing the crests it leaves behind in the air:
$$f_o = 1000 \cdot \frac{343 + 0}{343 - 30} = 1000 \cdot \frac{343}{313} = 1095.85\ \text{Hz}$$A moving observer changes the numerator, sweeping through crests that are still evenly spaced:
$$f_o = 1000 \cdot \frac{343 + 30}{343 - 0} = 1000 \cdot \frac{373}{343} = 1087.46\ \text{Hz}$$The medium breaks the symmetry — only in the relativistic (light) case do the two situations give identical results. At everyday speeds the gap is small (here 8.4 Hz, under 1 %), which is why the approximation \(\Delta f / f_s \approx v_{rel}/v\) is good enough for slow traffic but not for aircraft.
Note the two other patterns
- Approach and recession are not mirror images. Row 2 gains 95.85 Hz while row 3 loses only 80.43 Hz — the rise as something comes at you is always larger in magnitude than the drop as it leaves. For a moving observer (rows 4 and 5) the shift is perfectly symmetric at ±87.46 Hz, because the numerator is linear in \(v_o\).
- The blow-up near Mach 1. At \(v_s = 300\) m/s the denominator is only \(343 - 300 = 43\) m/s, so the frequency multiplies by nearly 8. As \(v_s \to v\) the denominator goes to zero and \(f_o \to \infty\): the crests pile up on a single surface, which is the shock front (sonic boom). For \(v_s > v\) the formula returns a negative frequency and is simply no longer valid — supersonic sources need the Mach-cone treatment instead.
FAQ
What if the source speed equals the wave speed? The denominator becomes zero and the equation breaks down; the wavefronts pile up into a shock front (the sonic boom at Mach 1).
Can I use this for light? Not accurately. Light has no medium and requires the relativistic Doppler formula, which depends only on relative speed and includes a time-dilation factor.
Why do source and observer motion give different results? A moving source compresses the wavelength itself, while a moving observer simply sweeps through more wavefronts per second. The two effects are not symmetric, which is why they appear in different parts of the fraction.