# Doppler Effect Calculator

> Computes the frequency received by an observer when the source and/or the observer move through a medium at rest, from the acoustic Doppler formula f′ = f·(v ± v_observer) / (v ∓ v_source), plus the shift in hertz and in semitones.

- Calculator id: `doppler-effect` · Category: Physics (`physics`) · Tool name: `calculate_doppler_effect`
- Canonical page: https://tttkmbb.com/physics/doppler-effect · This document: https://tttkmbb.com/physics/doppler-effect.md · JSON definition: https://tttkmbb.com/physics/doppler-effect.json

## Purpose

Computes the frequency received by an observer when the source and/or the observer move through a medium at rest, from the acoustic Doppler formula f′ = f·(v ± v_observer) / (v ∓ v_source), plus the shift in hertz and in semitones.

**Use when:** You need the pitch change of a siren, horn, engine or ultrasound echo when the source or the listener moves at a known speed relative to the air or another medium.

**Do not use when:** The wave is light or radio (use the relativistic Doppler formula), the source moves at or above the wave speed (a shock wave forms, no steady tone), or you need the wavelength of a wave without motion (use wavelength-frequency).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `source_frequency_hz` | number | Hz | required | Frequency emitted by the source in hertz. (> 0, max 1000000000000) |
| `wave_speed_m_s` | number | m/s | optional, default 343 | Propagation speed of the wave in the medium. Default 343 m/s (sound in air at 20 °C); about 331 at 0 °C, 1480 in water, 5960 in steel. (> 0, max 100000) |
| `source_speed_m_s` | number | m/s | optional, default 0 | Speed of the source relative to the medium (0 = stationary), along the line joining source and observer. (min 0) |
| `source_direction` | enum: approaching \| receding |  | optional, default "approaching" | Whether the source moves towards or away from the observer. |
| `observer_speed_m_s` | number | m/s | optional, default 0 | Speed of the observer relative to the medium (0 = stationary), along the line joining source and observer. (min 0) |
| `observer_direction` | enum: approaching \| receding |  | optional, default "approaching" | Whether the observer moves towards or away from the source. |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `observed_frequency_hz` | number | Hz | f′ = f × (v ± v_observer) / (v ∓ v_source). |
| `frequency_shift_hz` | number | Hz | f′ − f; positive when the pitch rises. |
| `frequency_ratio` | number |  | f′ / f. |
| `shift_semitones` | number | semitones | 12 × log₂(f′ / f): the musical interval of the pitch change (12 = one octave). |
| `wavelength_source_m` | number | m | v / f: wavelength the source would produce in the medium at rest. |
| `wavelength_observed_m` | number | m | v / f′: wavelength corresponding to the observed frequency (the compressed or stretched wavelength in the medium when only the source moves). |
| `note` | string |  | Direction and size of the pitch change and the assumptions of the formula. |

## Formula

`observed_frequency_hz = source_frequency_hz × (wave_speed_m_s ± observer_speed_m_s) / (wave_speed_m_s ∓ source_speed_m_s), upper signs for approaching (observer +, source −), lower signs for receding; frequency_shift_hz = f′ − f; frequency_ratio = f′ / f; shift_semitones = 12 × log2(f′ / f); wavelength_source_m = v / f; wavelength_observed_m = v / f′`

Classical (non-relativistic) Doppler effect for waves in a medium at rest, with source and observer moving along the line joining them; motion of the source and of the observer are not symmetric because the medium defines the reference frame.

## Data Sources

- Wikipedia – Doppler effect — https://en.wikipedia.org/wiki/Doppler_effect (reference, retrieved 2026-09-24)
- HyperPhysics – Doppler effect — http://hyperphysics.phy-astr.gsu.edu/hbase/Sound/dopp.html (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/doppler-effect?source_frequency_hz=…`
- `POST https://tttkmbb.com/api/v1/calculate/doppler-effect` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/doppler-effect · OpenAPI operationId `calculate_doppler_effect` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "doppler-effect", "inputs": {…}}`

## Example

- 500 Hz siren approaching at 30 m/s, listener at rest: inputs `{"source_frequency_hz":500,"source_speed_m_s":30,"source_direction":"approaching"}` → `{"observed_frequency_hz":547.92,"frequency_shift_hz":47.92,"frequency_ratio":1.0958,"shift_semitones":1.58,"wavelength_source_m":0.686,"wavelength_observed_m":0.626}`
- Listener approaching a stationary 1000 Hz source at 20 m/s: inputs `{"source_frequency_hz":1000,"observer_speed_m_s":20,"observer_direction":"approaching"}` → `{"observed_frequency_hz":1058.31,"frequency_shift_hz":58.31,"frequency_ratio":1.0583,"shift_semitones":0.98}`

```
GET https://tttkmbb.com/api/v1/calculate/doppler-effect?source_frequency_hz=500&source_speed_m_s=30&source_direction=approaching
```

## Limitations

The wave is light or radio (use the relativistic Doppler formula), the source moves at or above the wave speed (a shock wave forms, no steady tone), or you need the wavelength of a wave without motion (use wavelength-frequency). Classical (non-relativistic) Doppler effect for waves in a medium at rest, with source and observer moving along the line joining them; motion of the source and of the observer are not symmetric because the medium defines the reference frame. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**What happens when the source moves away?**

The pitch drops: the same 500 Hz siren receding at 30 m/s is heard at 500 × 343 / 373 = 459.79 Hz, a smaller shift than the 47.92 Hz rise when approaching.

**Why do a moving source and a moving observer give different results at the same speed?**

Sound travels at a fixed speed in the air. A moving source compresses the wavelength itself, while a moving observer only meets the unchanged wavefronts at a different rate, so the two cases differ (547.92 vs 543.73 Hz for 30 m/s at 500 Hz).

**Does this work for light or radar?**

Not exactly: light has no medium and needs the relativistic formula f′ = f·√((1 + β)/(1 − β)). For speeds far below c the classical result is a close approximation.

## Related

- [Wavelength & Frequency Calculator](https://tttkmbb.com/physics/wavelength-frequency.md) — Wavelength of the emitted or observed frequency at the wave speed.
- [Speed, Distance & Time Calculator](https://tttkmbb.com/physics/speed-distance-time.md) — Convert vehicle speeds from km/h or mph to m/s.
- [Frequency Converter](https://tttkmbb.com/conversion/frequency.md) — Convert frequencies between Hz, kHz and MHz.
