Physics: Mechanics, Waves & Thermodynamics Waves, Sound & Optics Classical Doppler formula for a medium; relativistic longitudinal Doppler for light

Doppler Effect Calculator

Enter the emitted frequency and how fast the source and listener are moving, and this calculator returns the frequency actually heard, the shift in hertz, the wavelength in the medium and the pitch change in cents. The sound mode uses the classical formula with the wave speed of the medium; the light mode uses the relativistic longitudinal Doppler formula, in which only the relative velocity matters. Positive velocities mean closing the gap; enter a negative number for motion apart.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Wave typeSound needs a medium and treats source and observer motion differently; light depends only on the relativistically combined relative velocity.Sound (or any wave in a medium)
Emitted frequency fThe frequency measured in the source's own frame, before any motion is considered.1000 Hz
Wave speed in the medium v343.2 m/s for air at 20 °C, 1481 m/s for fresh water, 1500 m/s for seawater sonar work.343.2 m/s
Source velocity toward the observerPositive when the source is closing on the observer; enter a negative value when it is moving away.30 m/s
Observer velocity toward the sourcePositive when the observer is closing on the source. In light mode the two are combined relativistically into a single closing velocity.0 m/s

It returns

  • Observed frequency — What the listener or receiver actually measures.
  • Frequency shift
  • Observed wavelength
  • Pitch change
  • Source speed ÷ wave speed (Mach or β)

The formula

f=fv+vovvs
f=f1+β1β
cents=1200log2(ff)

In plain text: f′ = f · (v + v_o) / (v − v_s)

  • f′Frequency measured by the observer (Hz)
  • fFrequency emitted by the source (Hz)
  • vSpeed of the wave in the medium (m/s)
  • v_oObserver velocity, positive toward the source (m/s)
  • v_sSource velocity, positive toward the observer (m/s)
  • βRelative velocity divided by the speed of light (dimensionless)

The sound formula is asymmetric: source motion changes the wavelength in the medium, observer motion changes the rate at which existing wavefronts are met. Light has no medium, so only the relative velocity appears.

Updated Category Waves, Sound & Optics Verified against published test cases Reading time 11 min

What actually changes when a source moves

A stationary source emits a crest every T seconds, and each crest spreads outward at the wave speed of the medium, so consecutive crests sit vT apart in every direction. Set the source moving and the picture changes in one specific way: during the interval between emitting one crest and the next, the source itself has advanced vsT. Ahead of it the crests are packed to (v − vs)T; behind it they are stretched to (v + vs)T.

The wavelength in the medium has physically changed. Anyone standing ahead of the source meets those compressed crests at the fixed medium speed, so they arrive more often: f′ = v/λ′ = fv/(v − vs). That is the source term in the denominator.

An observer who moves does something different. The wavelength in the medium is untouched — the source is stationary, so the crests are evenly spaced as before — but the observer runs into them at a closing speed of v + vo. So f′ = (v + vo)/λ = f(v + vo)/v, which is the observer term in the numerator.

The two mechanisms are genuinely different, and they give different answers for the same speed. At 30 m/s toward a listener with v = 343 m/s, a moving 1,000 Hz source gives 1,095.85 Hz; a listener moving at 30 m/s toward a still source gets 1,087.46 Hz. Both are shifts upward, but the source case is larger, because dividing by (1 − x) grows faster than multiplying by (1 + x). Only if you knew the medium's rest frame could you tell the two cases apart from the sound alone — and that asymmetry is exactly what fails for light.

Why light needs a different formula

Light has no medium. There is no rest frame to measure velocities against, so a formula that distinguishes source motion from observer motion cannot be right. Special relativity replaces it with one that depends only on the relative velocity, and adds the time-dilation factor that the classical derivation has no way of knowing about. When both the source and the observer are moving, their velocities do not simply add: the closing velocity is β = (βs + βo)/(1 + βsβo), so two bodies each doing 0.5c toward one another approach at 0.8c, not c. This calculator applies that composition before the Doppler factor.

For motion straight along the line of sight, f′ = f√((1 + β)/(1 − β)) with β = v/c positive for approach. The formula is manifestly reciprocal: approaching at 0.5c multiplies the frequency by 1.7320508, and receding at 0.5c multiplies it by 0.5773503, and those two numbers are exact reciprocals. Classical physics has no such symmetry.

At everyday speeds the two agree. For β << 1 the relativistic formula reduces to f′ ≈ f(1 + β), which is what police radar and weather radar use. The difference only becomes significant above a few percent of c, where the second-order term β²/2 starts to matter.

Relativity also predicts a shift with no line-of-sight motion at all. A source moving purely transversely still appears redshifted by the Lorentz factor, f′ = f/γ, purely from time dilation. The transverse Doppler effect was confirmed by Ives and Stilwell in 1938 and has no classical counterpart whatsoever. This calculator handles the longitudinal case; for a source moving at an angle you need the general form with a cosine.

In astronomy the same arithmetic is usually expressed as redshift z = (λ′ − λ)/λ. For nearby galaxies z ≈ β, and recession velocities follow from spectral line positions. For distant objects the observed shift is cosmological rather than kinematic — space itself expands between emission and reception — so applying this velocity formula to a quasar at z = 6 gives a meaningless answer.

Worked example: an ambulance passing you at 90 km/h

An ambulance siren emits a steady 1,200 Hz tone. It approaches at 90 km/h and passes you. Air is at 20 °C, so v = 343.2 m/s. What do you hear, and by how much does the pitch drop as it goes by?

  1. Convert the speed. 90 km/h ÷ 3.6 = 25.0 m/s.
  2. Approaching. f′ = 1200 × 343.2 ÷ (343.2 − 25.0) = 1200 × 343.2 ÷ 318.2 = 1,294.28 Hz.
  3. Receding. f′ = 1200 × 343.2 ÷ (343.2 + 25.0) = 1200 × 343.2 ÷ 368.2 = 1,118.52 Hz.
  4. The drop. 1,294.28 − 1,118.52 = 175.76 Hz, heard as a sudden fall the instant the ambulance passes.
  5. In musical terms. 1200 × log2(1294.28 ÷ 1118.52) = 1200 × log2(1.15713) = 1200 × 0.21055 = 252.7 cents. A whole tone is 200 cents and a minor third is 300, so the drop lands about a quarter-tone above a whole tone. That matches everyday experience: a passing siren drops by a tone or so, not by an octave.
  6. Check the wavelengths. Ahead of the ambulance the crests are 318.2 ÷ 1200 = 0.2652 m apart; behind it they are 368.2 ÷ 1200 = 0.3068 m apart. Both waves still travel at 343.2 m/s — only their spacing differs.

Notice that the shift is not symmetric about 1,200 Hz: the rise on approach is 94.28 Hz and the fall on recession is 81.48 Hz. The denominator shrinking produces a bigger effect than the denominator growing, which is a direct consequence of the formula's shape and a good check that you have not accidentally used the observer-motion form.

Reading the result and knowing when it breaks

The sign tells you the direction of relative motion, and nothing else. A positive shift means the gap is closing, whether the source moved, the observer moved, or both. A zero shift means there is no motion along the line of sight — a source passing you at closest approach is momentarily moving purely sideways, and at that instant the classical shift is zero even though the source is moving fast.

The classical formula fails in three specific places. When vs = v the denominator vanishes: the source keeps pace with its own wavefronts, they pile into a single surface, and what you get is a shock front rather than an infinite frequency. Above that, at supersonic speed, the source outruns its sound entirely and an observer ahead of it hears nothing at all until the Mach cone arrives — the reason a supersonic aircraft is silent until the boom. And when vo < −v, an observer fleeing faster than the wave travels never meets the wavefronts at all.

For pitch, use cents rather than hertz. A 100 Hz shift on a 200 Hz tone is an octave; the same 100 Hz shift on a 4 kHz tone is barely audible. One cent is a hundredth of an equal-tempered semitone, and human listeners can generally detect about 5–10 cents on a sustained tone. The 253-cent drop from a passing ambulance is unmistakable; a walking pace of 1.4 m/s gives 1200 log2(343.2/341.8) = 7.1 cents, which sits right at that detection threshold.

For radar and sonar there is one extra factor of two. The wave is Doppler-shifted once travelling to the moving target and again on the way back, so the round-trip shift is Δf ≈ 2vf/c for radar and 2vf/vsound for sonar. Enter half your target speed here, or simply double the result.

A 1,000 Hz siren in 343 m/s air, for a stationary listener

Computed from f′ = 1000 × 343/(343 ∓ v_s). The final column is the whole audible jump heard at the instant of passing.
Source speedMachApproaching (Hz)Receding (Hz)Drop on passing (Hz)
0 m/s0.0001,000.001,000.000.00
10 m/s (36 km/h)0.0291,030.03971.6758.36
20 m/s (72 km/h)0.0581,061.92944.90117.02
30 m/s (108 km/h)0.0871,095.85919.57176.28
40 m/s (144 km/h)0.1171,132.01895.56236.45
50 m/s (180 km/h)0.1461,170.65872.77297.88
100 m/s (360 km/h)0.2921,411.52774.27637.25

The approach shift is always larger in magnitude than the recession shift for the same speed, because the source term sits in the denominator.

Mistakes that give a wrong Doppler answer

  • Using one formula for both source and observer motion. For sound they are not interchangeable. Source motion goes in the denominator, observer motion in the numerator. For the same speed u the two answers differ by the factor 1/(1 − u²/v²), so at 30 m/s in 343 m/s air the gap is 0.77% and it grows with the square of the speed ratio.
  • Getting the sign convention wrong. Here both velocities are positive when the gap is closing. Many textbooks use a coordinate axis instead, which flips one of the signs; always check which convention a formula assumes before substituting.
  • Forgetting the factor of two in radar and sonar. A reflected signal is shifted on the way out and again on the way back, so the measured shift is twice the one-way value.
  • Applying the classical formula to light. It gives the right first-order answer but misses time dilation, and it wrongly predicts a difference between source and observer motion for a wave with no medium.
  • Using the longitudinal formula at closest approach. When the source passes to one side, the line-of-sight component is what counts, and it goes to zero at the closest point even though the speed does not.
  • Ignoring the medium's own motion. Wind moves the medium: a headwind changes the effective wave speed relative to the ground for both parties, and must be added to v before the formula is applied.
  • Reading a shift in hertz as a shift in perceived pitch. Pitch is logarithmic. Convert to cents before deciding whether a shift is musically large.

Where the Doppler shift earns its keep

Christian Doppler proposed the effect in 1842 to explain the colours of binary stars, and Buys Ballot tested it in 1845 with trumpeters on a moving train in the Netherlands — a genuinely good experiment, because trained musicians could report the interval precisely.

Today the shift is the measurement principle behind speed enforcement radar, weather radar that separates rain motion from rain intensity, medical Doppler ultrasound that maps blood flow direction and speed, laser vibrometry, and satellite navigation, where the Doppler shift on a GPS carrier is large enough that a receiver must track it to acquire a lock at all. In astronomy it gives radial velocities, reveals exoplanets by the wobble they impose on their star, and underpins the redshift–distance relation.

The frequency shift always sits alongside two other calculations. The wavelength change follows from the same v = fλ relation applied with the new spacing, and the intensity at the observer follows the inverse-square behaviour that sets the decibel level — a siren gets both higher and louder on approach, and separating the two effects is exactly what makes a passing vehicle so distinctive. If the wave crosses into another medium on the way, refraction bends it and changes the line-of-sight geometry that the shift depends on. And the underlying oscillator that produces the emitted frequency is usually a resonant system of the kind treated by the pendulum and spring formulas.

Frequently asked questions

Why does a siren drop in pitch as it passes?

Because the sign of the line-of-sight velocity flips. While the vehicle approaches, each successive wavefront is emitted closer to you, so they arrive packed together and the pitch is raised. Once it has passed, each wavefront is emitted further away, so they arrive stretched out and the pitch is lowered. The change happens over the short interval when the vehicle is nearly beside you.

Is the shift the same whether the source or the listener moves?

Not for sound. A source moving at 30 m/s toward a still listener in 343 m/s air gives 1,095.85 Hz from a 1,000 Hz tone; a listener moving at 30 m/s toward a still source gets 1,087.46 Hz. The medium provides a preferred frame, so the two situations are physically distinguishable. For light there is no medium, and only the relative velocity matters.

What happens when the source reaches the speed of sound?

The classical formula divides by zero because the source keeps pace with its own wavefronts. Physically, the crests pile onto a single surface of very high amplitude — the shock front. Beyond that speed the source outruns its sound, so an observer ahead of it hears nothing until the Mach cone arrives, which is why a supersonic aircraft is silent on approach and then produces a boom.

How do I calculate speed from a radar reading?

Rearrange the low-speed approximation, remembering the round trip: v = c·Δf / (2f). A 24.125 GHz radar reading a 1.6 kHz shift corresponds to v = 3×10⁸ × 1600 / (2 × 2.4125×10¹⁰) = 9.95 m/s, about 36 km/h. The factor of two is what catches people out.

What is a cent, and how many can I hear?

A cent is one hundredth of an equal-tempered semitone, so an octave is 1,200 cents. Most listeners detect about 5–10 cents on a sustained tone played immediately after a reference, and trained musicians do better. The 253-cent drop from the passing ambulance worked through above sits between a whole tone and a minor third, and is obvious to anyone.

Does the Doppler effect change the loudness too?

Yes, but for a different reason. The pitch change comes from relative motion along the line of sight; the loudness change comes from the distance changing, which follows the inverse-square law. They peak at different moments: the loudness is greatest at the closest approach, exactly where the line-of-sight velocity, and hence the pitch shift, passes through zero.

Why is there a shift for light even when the motion is sideways?

Because of time dilation. A clock moving transversely runs slow by the Lorentz factor γ, so its emitted frequency is reduced by 1/γ even with no approach or recession at all. This transverse Doppler effect has no classical analogue and was confirmed experimentally by Ives and Stilwell in 1938. It is a second-order effect, proportional to β².

Can I use this to work out a galaxy's speed from its redshift?

For nearby galaxies, yes: enter the observed and emitted frequencies and read off the velocity, or use z ≈ β for small shifts. For distant objects the interpretation changes, because cosmological redshift comes from the expansion of space between emission and reception rather than from motion through space, and the simple velocity formula stops applying.

References

  • Fundamentals of Acoustics, 4th ed. — Wiley (Kinsler, Frey, Coppens & Sanders)
  • Spacetime Physics, 2nd ed. — W. H. Freeman (Taylor & Wheeler)
  • An Experimental Study of the Rate of a Moving Atomic Clock (Ives & Stilwell, 1938), Journal of the Optical Society of America 28(7), 215–226 — Optical Society of America