Home › Physics › Wavelength & Frequency Calculator
Wavelength & Frequency Calculator
Converts between wavelength and frequency for a wave of known propagation speed (default: the speed of light in vacuum) and, for electromagnetic waves in vacuum, reports the photon energy E = h·f in joules and electronvolts.
When to use
You know either the wavelength or the frequency of a light, radio or sound wave and need the other, or you need the photon energy of light of a given wavelength.
Do not use when: The wave travels in a dispersive medium (glass, water) unless you supply the correct phase speed, or you need Doppler shifts or refraction.
Formula
wavelength_m = wave_speed_m_s / frequency_hz; frequency_hz = wave_speed_m_s / wavelength_m; photon_energy_j = h × frequency_hz with h = 6.62607015e-34 J·s; photon_energy_ev = photon_energy_j / 1.602176634e-19
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
wavelength_m | number | m | no | Wavelength in metres (1 nm = 1e-9 m, so 500 nm = 5e-7). Give either wavelength_m or frequency_hz. Range: > 0 |
frequency_hz | number | Hz | no | Frequency in hertz (1 MHz = 1e6 Hz, 1 GHz = 1e9 Hz). Give either wavelength_m or frequency_hz. Range: > 0 |
wave_speed_m_s | number | m/s | default 299792458 | Propagation speed in the medium. Default c = 299,792,458 m/s (light in vacuum); use about 343 for sound in air at 20 °C, 1480 for sound in water. Range: > 0, ≤ 299792458 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
solved_for | string | Which quantity was computed: wavelength_m or frequency_hz. | |
wavelength_m | number | m | λ = v / f. |
wavelength_nm | number | nm | Wavelength in nanometres (visible light ≈ 380–750 nm). |
frequency_hz | number | Hz | f = v / λ. |
wave_speed_m_s | number | m/s | Propagation speed used. |
photon_energy_ev | number | eV | E = h × f in electronvolts (only for electromagnetic waves in vacuum, i.e. wave_speed_m_s = c). |
photon_energy_j | string | J | Photon energy in joules as a scientific-notation string with 5 significant figures, e.g. "3.9729e-19" (only when wave_speed_m_s = c). |
Example
Green light, 500 nm in vacuum: {"wavelength_m":5e-7} → {"solved_for":"frequency_hz","frequency_hz":599584916000000,"wavelength_nm":500,"photon_energy_ev":2.479684,"photon_energy_j":"3.9729e-19"}
440 Hz sound in air (343 m/s): {"frequency_hz":440,"wave_speed_m_s":343} → {"solved_for":"wavelength_m","wavelength_m":0.779545,"wavelength_nm":779545454.5455}
GET https://tttkmbb.com/api/v1/calculate/wavelength-frequency?wavelength_m=5e-7
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/wavelength-frequency(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/wavelength-frequency · Markdown: https://tttkmbb.com/physics/wavelength-frequency.md · JSON definition: https://tttkmbb.com/physics/wavelength-frequency.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="wavelength-frequency" - OpenAPI operationId:
convert_wavelength_frequency - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Wavelength (reference)
- Wikipedia – Photon energy (reference)
- NIST CODATA 2018 – Fundamental Physical Constants (standard)
FAQ
Why is there no photon energy for my sound wave?
Photon energy E = h·f applies to electromagnetic radiation only; it is reported when the wave speed equals c (vacuum). Sound is a mechanical wave.
What speed should I use for light in glass or water?
c divided by the refractive index (about 1.5 for glass, 1.33 for water); the frequency stays the same while the wavelength shortens.
Related calculators
- Pendulum Period Calculator — Another periodic system: period and frequency of a pendulum.
- Frequency Converter — Convert frequencies between Hz, kHz, MHz and GHz.