Doppler Effect Calculator | Sound & Light
Calculate observed frequency shift for sound and light using classical and relativistic Doppler formulas. Includes medium presets, direction toggles, semitone output, and redshift z.
Quick Presets
Wave Speed (Medium)
Source Frequency (f_s)
Source Velocity (v_s)
Observer Velocity (v_o)
All calculations are performed live in your browser, no data is sent to any server. Powered by digithelm.com.
What Is the Doppler Effect Calculator | Sound & Light?
The Doppler effect describes the change in perceived frequency of a wave when the source and observer are moving relative to each other. When they approach each other, wavefronts bunch together, the observer encounters more cycles per second, so the frequency rises (blueshift). When they move apart, the reverse happens (redshift).
For sound and mechanical waves, the classical formula applies. Both the source velocity and the observer velocity contribute independently, because the wave propagates through a medium. The medium's own rest frame sets the reference. A police siren approaching at 30 m/s in 343 m/s air sounds about 10% higher in pitch than when stationary.
For light and EM radiation, special relativity demands the symmetric formula involving β = v/c. There is no medium to define an absolute rest frame, so only the relative velocity between source and observer matters. Astronomers use the redshift parameter z to measure galaxy recession speeds, a galaxy with z = 1 has its light wavelengths doubled, implying recession at roughly 0.6c.
The musical semitone output in sound mode converts the frequency ratio to cents (100 cents = 1 semitone) using 12 × log₂(f_obs / f_s). A ratio of 1.059 (one equal-tempered semitone) corresponds to motion of about 20 m/s in air.
Formula
| Symbol | Name | Description |
|---|---|---|
| f_obs | Observed frequency | The frequency actually detected by the observer |
| f_s | Source frequency | The frequency emitted at the source at rest |
| v | Wave / medium speed | Speed of sound in the medium (air, water, steel, etc.) |
| v_o | Observer velocity | Speed of observer; positive when moving toward the source |
| v_s | Source velocity | Speed of source; positive when moving toward the observer |
| β | Beta (v/c) | Source speed as fraction of c; used for light / EM waves |
| z | Redshift parameter | z = f_s/f_obs − 1; cosmological measure of recession speed |
| λ | Wavelength | λ = v / f; Doppler-shifted wavelength changes with frequency |
How to Use
- 1Choose sound or light mode: Select "Sound / Mechanical" for waves through a medium (air, water, steel), or "Light / EM" for electromagnetic radiation using the relativistic formula.
- 2Set the source frequency: Enter the emitted frequency and pick a unit (Hz, kHz, MHz, GHz, THz). Try a preset, police siren, ambulance, train whistle, bat sonar, or stellar sources.
- 3Sound: pick a medium: Choose from Air at 20°C (343 m/s), seawater, steel, hydrogen, or set a custom wave speed. The medium determines how fast the wavefronts travel.
- 4Sound: set velocities: Enter source and observer speeds in m/s. Use the direction toggles to indicate whether each is moving toward or away from the other, or stationary.
- 5Light: set β or speed: Enter the source speed as a fraction of c (β) or in m/s. Toggle the direction (approaching = blueshift, receding = redshift). β must be less than 1.
- 6Press Calculate or Enter: The result shows the observed frequency, frequency shift, Doppler factor, semitones (sound) or redshift z (light), plus source and observed wavelengths.
- 7Inspect the step trace: Expand "Show calculation steps" to see every intermediate value, useful for homework, physics coursework, or verifying exam answers.
- 8Reset or copy: Press Reset or Esc to clear all inputs. The calculator remembers your last values via localStorage so you can pick up where you left off.
Example Calculation
Example 1: Ambulance siren approaching at 30 m/s
An ambulance emits a 700 Hz siren. It approaches at 30 m/s; you are stationary. Air speed = 343 m/s.
Example 2: Train passing, approaching then receding
A train horn at 400 Hz moves at 50 m/s. Compare approaching vs receding (observer stationary):
Example 3: Galaxy recession, relativistic redshift
A galaxy recedes at β = 0.20 (20% of c). Hydrogen Lyman-alpha emission line: f_s = 2.466 × 10¹⁵ Hz (λ = 121.6 nm).
Understanding Doppler Effect | Sound & Light
What Is the Doppler Effect?
The Doppler effect (or Doppler shift) is the change in frequency of a wave observed when the source and observer are in relative motion. Named after Austrian physicist Christian Doppler (1842), it applies to all wave phenomena, sound, light, radar, ultrasound, and gravitational waves. The effect is not a change in the wave itself but a change in how many wavefronts per second the observer intercepts.
Classical vs Relativistic Doppler
- ›Classical (acoustic) Doppler: Requires a medium. The formula is asymmetric, source motion and observer motion have different mathematical effects because the medium defines an absolute rest frame. Used for sound, sonar, seismic waves, and radar (non-relativistic approximation).
- ›Relativistic (electromagnetic) Doppler: Applies to light and all EM radiation. No medium needed. The formula is symmetric, only relative velocity matters. Reduces to the classical formula at low β but correctly handles high-speed motion near c.
- ›Transverse Doppler effect: A purely relativistic effect, a source moving perpendicular to the observer-source line still produces a redshift due to time dilation, even though classical Doppler predicts zero shift. This has been confirmed experimentally with atomic clocks.
Redshift and Blueshift
- ›Blueshift (approaching): Observed frequency increases; wavelength decreases. The spectrum shifts toward shorter (bluer) wavelengths. Occurs when source and observer move toward each other.
- ›Redshift (receding): Observed frequency decreases; wavelength increases. The spectrum shifts toward longer (redder) wavelengths. Cosmic expansion causes all distant galaxies to be redshifted, discovered by Edwin Hubble in 1929.
- ›Cosmological redshift z: Defined as z = (λ_obs − λ_emit) / λ_emit = f_s/f_obs − 1. The most distant galaxies observed have z > 10, meaning the universe has expanded by a factor of 11 since their light was emitted.
Real-World Applications
- ›Weather radar (Doppler radar): Measures the velocity of precipitation toward or away from the radar antenna by detecting frequency shifts of reflected microwave pulses. Used to track storm rotation and tornadoes.
- ›Medical ultrasound: Doppler ultrasound quantifies blood flow velocity in arteries and veins. Color Doppler imaging maps flow direction; spectral Doppler plots velocity over time for cardiac assessment.
- ›Astronomy and cosmology: Spectral line shifts reveal stellar radial velocities, enable detection of exoplanets (radial velocity method), measure galaxy recession rates, and map the cosmic microwave background anisotropy.
- ›Speed enforcement (radar guns): Police radar emits a microwave signal; the car reflects it with a Doppler shift proportional to its speed. Laser LIDAR uses a similar principle with a pulse time-of-flight measurement.
- ›Sonar and echolocation: Bats and dolphins use Doppler shifts in their ultrasonic echoes to estimate prey velocity and distance, achieving remarkable precision even in cluttered environments.
- ›Structural health monitoring: Vibration Doppler sensing with laser vibrometers detects tiny surface movements (nanometer scale) in bridges, turbine blades, and aerospace structures without physical contact.
Sonic Boom and Mach Number
When a source moves at exactly the wave speed (v_s = v), the denominator of the classical formula becomes zero, the observed frequency approaches infinity. This is the sonic barrier. When the source exceeds the wave speed (v_s > v), a conical shockwave forms (a Mach cone). The Mach angle θ satisfies sin θ = v/v_s. At Mach 2 (v_s = 2v), the Mach cone half-angle is 30°. The classical Doppler formula no longer applies beyond this point; the shock physics are governed by oblique shock relations.
Semitone Conversion
In equal temperament, one semitone corresponds to a frequency ratio of 2^(1/12) ≈ 1.0595. The Doppler semitone shift is 12 × log₂(f_obs / f_s). A moving source that shifts the pitch by exactly one semitone (a half-step on a piano) must travel at v_s = v × (1 − 1/2^(1/12)) ≈ 0.0561 × v. In air at 20°C this corresponds to about 19.2 m/s (69 km/h) for the source approaching. Useful for musicians trying to understand pitch perception in moving vehicles.
Data Source
Wave speed values for media presets (air, water, seawater, hydrogen, steel) are sourced from the Engineering Toolbox Speed of Sound database and NIST Handbook of Physical Constants. The speed of light value (c = 299 792 458 m/s) is the 2019 SI-defined exact value. All calculations use live browser-side computation, no server call is made; results reflect real-time physics.
Frequently Asked Questions
Why does a siren sound higher as an ambulance approaches and lower as it passes?
It comes down to how wavefronts reach your ear:
- Approaching: Each wavefront is emitted slightly closer to you than the last, so they bunch together. More cycles arrive per second, the pitch rises.
- Receding: The source is pulling away, wavefronts spread out, fewer cycles arrive per second, the pitch drops.
The size of the shift depends on how fast the ambulance is moving relative to the speed of sound. At 30 m/s in 343 m/s air, the pitch jump is about 10%.
What is the difference between the classical and relativistic Doppler formulas?
Classical formula, for sound and mechanical waves:
f_obs = f_s × (v + v_o) / (v − v_s)
Requires a medium (air, water, etc.). Source motion and observer motion enter separately because the medium defines an absolute rest frame.
Relativistic formula, for light and EM radiation:
f_obs = f_s × √((1 + β) / (1 − β))
No medium needed. Only relative velocity β = v/c matters. Source and observer motion are equivalent. At low speeds both formulas give nearly the same result, but the relativistic one is always correct for EM waves.
What happens when the source travels faster than sound?
The classical formula breaks down in stages:
- v_s = v (Mach 1): The denominator hits zero. Frequency theoretically approaches infinity, in practice, a wall of compressed wavefronts builds up at the sonic barrier.
- v_s > v (supersonic): A conical shockwave (Mach cone) forms behind the source. Mach number M = v_s / v. At Mach 2 the cone half-angle is 30°.
The Doppler formula no longer applies in supersonic flow, oblique shock relations govern the physics instead. This calculator shows a sonic boom warning rather than an invalid number.
What is redshift (z) and how is it calculated?
Redshift z measures how much the observed wavelength has stretched relative to the emitted one:
z = λ_obs / λ_emit − 1 = f_s / f_obs − 1
- z = 0: No shift, source is stationary relative to observer.
- z = 1: Wavelength has doubled; source recedes at ~60% of c.
- z > 10: Universe has expanded more than 11× since the light was emitted.
- z < 0 (blueshift): Source is approaching. Andromeda Galaxy has z ≈ −0.001.
How do I convert a Doppler frequency ratio to musical semitones?
Use this formula:
semitones = 12 × log₂(f_obs / f_s)
- One octave = 12 semitones = a frequency ratio of exactly 2.
- One semitone = a ratio of 2^(1/12) ≈ 1.0595 (a half-step on a piano).
- To shift pitch by one semitone in 343 m/s air, a source must approach at ~19.2 m/s (69 km/h).
The calculator shows this automatically alongside the frequency result.
Does the Doppler effect work for both source motion and observer motion?
Yes, but the physics differs between sound and light:
- Sound: Source motion and observer motion produce different frequency changes even at the same relative speed. Source motion compresses or stretches the wavelength itself; observer motion changes how fast wavefronts are intercepted. The medium's rest frame is what makes them unequal.
- Light: Only the relative velocity between source and observer matters. There is no medium to define a rest frame, so the two motions are physically indistinguishable. The symmetric relativistic formula handles both with a single β = v/c.
How does Doppler radar measure wind speed?
Doppler weather radar works in three steps:
- Transmit: The antenna emits a pulse of microwave energy at a known frequency f_s.
- Reflect: Raindrops, snowflakes, and debris scatter the pulse back to the antenna, shifted in frequency by Δf = 2 f_s × v_r / c, where v_r is the particle's radial velocity.
- Reconstruct: By measuring Δf across the full scanning beam, computers build 3D wind-velocity maps and identify the rotation signatures of tornadoes in real time.
Can I use the Doppler effect to measure the speed of a moving object?
Yes. Rearrange the classical formula to isolate source speed:
v_s = v × (1 − f_s / f_obs)
You need three knowns, f_s (emitted frequency), f_obs (measured return frequency), and v (wave speed in the medium), and v_s follows directly. This is exactly how:
- Radar guns clock vehicle speeds on the road.
- Doppler ultrasound measures blood flow velocity in arteries.
- Astronomical spectroscopy determines stellar radial velocities from spectral line shifts.