Article — Doppler Effect Calculator
Doppler Effect Calculator
The Doppler effect is the change in observed frequency of a wave when the source or observer is moving. For sound, the formula is f′ = f (v + v_obs) / (v − v_src), where v is the wave speed in the medium. For light in vacuum, the relativistic version is f′ = f √((1−β)/(1+β)), with β = v/c.
Christian Doppler proposed the effect in 1842 to explain the color of binary stars. Three years later, Christoph Buys Ballot confirmed it for sound with a famous railway experiment near Utrecht: musicians on a moving train played a constant note while observers at the trackside reported the pitch change. The effect now underpins radar, sonar, ultrasound, and most of observational cosmology.
What is the Doppler effect?
When a wave source moves relative to an observer, the spacing between wave crests changes. Approach compresses crests and raises the frequency. Recession stretches them and lowers it. The amount depends on the relative velocity and the wave speed in the medium.
For everyday acoustics, the medium is air at 343 m/s (20°C). For underwater sonar, it is water at about 1480 m/s. For light, there is no medium, and the speed of light c = 299,792,458 m/s holds in every frame — so the calculation must include relativistic time dilation rather than a simple velocity addition.
The Buys Ballot experiment of 1845 used a steam train borrowed from the Dutch railway. Musicians played a sustained A on a horn from a flatcar, and observers at the trackside used their ears as detectors. The pitch dropped by a discernible amount as the train passed, matching Doppler's prediction within the era's measurement noise.
The Doppler effect formula for sound
The standard form is f′ = f (v + v_obs) / (v − v_src). Both velocities use the convention that positive means motion toward the other party. If the source moves away from the observer, flip the sign on v_src. If the observer moves away from the source, flip the sign on v_obs.
A worked example: an ambulance with a 700 Hz siren approaches at 30 m/s through still air. The observer stands still. The formula gives f′ = 700 × 343 / (343 − 30) = 767 Hz, a shift of +67 Hz or about 9.6%. That is just under a semitone, audible as a clearly higher pitch. After the ambulance passes, v_src reverses sign and the observed frequency drops to 643 Hz — the characteristic "siren swooping" effect.
Approach f′ > fRecession f′ < fBoth moving f′ = f (v+v_o)/(v−v_s)Same direction cancellation if equalDoppler shift in light and redshift
Light has no preferred medium and travels at c in every inertial frame. The longitudinal relativistic Doppler formula f′ = f √((1−β)/(1+β)) accounts for time dilation. Astronomers usually report shifts using the redshift parameter z = (λ′ − λ) / λ. For low velocities z ≈ β, but for distant galaxies z grows nonlinearly with recession speed.
The James Webb Space Telescope has detected galaxies with z > 14, meaning the wavelengths from those galaxies have stretched by a factor of more than 15 by the time the light reaches us. At those redshifts the relationship between distance and velocity also depends on the expansion history of the universe — the simple Doppler picture mixes with cosmological geometry.
If you plug β = 0.5 into the sound formula you get the wrong answer. The relativistic version gives factor √(0.5/1.5) ≈ 0.577, while a naive (1 − β) gives 0.5. The difference matters above β ≈ 0.1 — already at 30,000 km/s the relativistic correction is ~5%.
Radar Doppler and police speed guns
Police radar transmits a carrier (typically X-band at 10.5 GHz or K-band at 24.15 GHz). The vehicle reflects the wave, and the round-trip Doppler shift is Δf = 2 v f₀ / c, where v is the radial component of vehicle velocity. A 10 GHz radar facing a 100 km/h car (27.78 m/s) measures Δf = 1,853 Hz. Modern radar units are accurate to about ±2 km/h.
Laser-based LIDAR speed guns operate at near-infrared wavelengths (~905 nm). They typically measure distance over time rather than frequency shift, though Doppler-LIDAR variants do exist and can read radial velocity directly. Doppler-LIDAR is also used in autonomous vehicles for relative-velocity estimation of nearby cars.
Doppler ultrasound in medicine
Doppler ultrasound emits 2–10 MHz pulses and measures the frequency shift of echoes from moving red blood cells. Continuous-wave Doppler reads peak velocity but has no depth resolution. Pulsed-wave Doppler can localize a measurement to a specific vessel segment. Color Doppler overlays the velocity map on a B-mode image, encoding direction in red and blue.
Vascular studies, fetal monitoring, and echocardiography all rely on Doppler. Normal carotid peak velocities sit around 60–100 cm/s; values above 200 cm/s suggest significant stenosis. The angle between the ultrasound beam and the flow direction matters — the measured shift is proportional to cos(θ), and clinicians correct for this in real time.
- Doppler ultrasound uses 2–10 MHz carriers, well above the audible range
- Carotid peak velocity > 200 cm/s suggests >50% stenosis
- Fetal heart rate Doppler detects beats from ~10 weeks gestation
- Angle correction divides measured velocity by cos(θ) — best results at 30–60°
- GE Vivid and Philips Epiq dominate hospital echocardiography
- FDA limits ultrasound output to a mechanical index of 1.9 for diagnostic use
Doppler shift in astronomy
Edwin Hubble noted in the late 1920s that nearly all galaxies outside the Local Group show redshifted spectra. He combined Doppler redshifts with distance estimates from Cepheid variables and found a linear law: v = H₀ d. The current value of the Hubble constant from Planck CMB data is about 67.4 km/s per megaparsec; local measurements from supernovae give around 73 km/s/Mpc — the so-called Hubble tension.
Doppler shifts also reveal binary stars, exoplanets, and the rotation of galaxies. The radial-velocity method for exoplanets watches a star's spectral lines wobble as an unseen planet tugs it. A Jupiter-mass planet at 1 AU around a sun-like star produces a peak shift of about 28 m/s — easily measurable with modern echelle spectrographs.
The Milky Way moves through the cosmic microwave background at about 600 km/s. This produces a temperature dipole in the CMB of about 6.6 millikelvin — measured first by COBE in 1989 and refined to seven decimal places by Planck in 2018. It is the most precise absolute velocity measurement of our galaxy.
Common Doppler effect mistakes
The most frequent error is sign confusion. Pick one convention — typically, positive velocity means toward the other party — and stick with it. The second is mixing units: wave speed in m/s and source velocity in km/h. Always convert to consistent SI units before plugging into the formula.
For small velocities (v_src ≪ v), the fractional shift simplifies to Δf / f ≈ v_src / v. This is a useful sanity check: a 30 m/s source in 343 m/s air gives about 9% — within a few percent of the exact answer for either approach or recession.
A third mistake is applying the classical formula to light. At low velocities the error is tiny, but above β = 0.1 it grows quickly. Always use the relativistic form for electromagnetic waves unless you know the result will be used as a crude estimate.