Physics · Pressure and Waves
Wavelength calculator icon showing a sine wave with one wavelength marked and the electromagnetic spectrum

Wavelength calculator

This wavelength calculator solves v = fλ for wavelength, frequency or wave speed. It works out the speed of sound in air from the temperature, handles light in a vacuum or in glass and water through the refractive index, and gives the photon energy in joules and electronvolts with the band of the spectrum.

For light, enter the vacuum wavelength (the value quoted for lasers, LEDs and spectral lines). The frequency never changes when a wave enters a new medium; the speed and the wavelength do.

Sound wavelength calculator

The wavelength calculator finds the speed of sound in air from the temperature, or you pick another medium.
Concert pitch A4 = 440 Hz. Human hearing covers about 20 Hz to 20 kHz.
Speeds from OpenStax College Physics 2e, Table 17.1.

Wavelength calculator for light and photon energy

Electromagnetic waves: c = 299,792,458 m/s in vacuum, v = c/n in a material; E = h·f.
Microwave ovens use 2.45 GHz. For light type Hz in E notation: 5.64e14 Hz = 564 THz.
Vacuum 1, air 1.0003, water 1.333, typical glass 1.5, diamond 2.42.

Wavelength calculator for any wave: v = f·λ

Waves on a string or rope, water waves, seismic waves: solve for any one of the three.

How to use the wavelength calculator

Pick the panel for your kind of wave. The sound wavelength calculator finds the speed of sound in air from the temperature (or uses water, seawater, helium, aluminum, steel or a speed you type), then gives the wavelength for a frequency or the frequency for a wavelength. The light panel converts between frequency, vacuum wavelength and photon energy, adds the wavelength and speed inside a material with refractive index n, and names the band of the electromagnetic spectrum. The last panel solves v = fλ for any wave, such as a rope, a guitar string or a water wave. Units are selectable in every field of the wavelength calculator, and “Show the working” lists each substitution.

The wavelength formula: v = f · λ

A periodic wave moves forward one wavelength λ during one period T = 1/f, so its speed is the wavelength times the frequency (OpenStax College Physics 2e, section 17.2):

v = f · λ λ = v / f f = v / λ

The medium sets the speed, the source sets the frequency, and the wavelength follows. When a wave passes into a new medium its frequency stays the same, and its wavelength changes in proportion to the speed. That is why the light panel of the wavelength calculator keeps f fixed and divides the vacuum wavelength by n.

Speed of sound in air used by the wavelength calculator

v = √(γ · R · T / M) ≈ 331.3 m/s × √(T / 273.15 K)

Air behaves as an ideal gas with γ = 1.4 and M = 28.9647 g/mol, so the speed depends on the absolute temperature T only: 331.3 m/s at 0 °C, 343.2 m/s at 20 °C and 349.0 m/s at 30 °C. OpenStax writes the same law as 331 m/s × √(T/273 K). Pressure does not change the speed of sound in an ideal gas, so the wavelength calculator asks only for the temperature.

Light and photon energy in the wavelength calculator

λ₀ = c / f v = c / n λ = λ₀ / n
E = h · f = h · c / λ₀ E (eV) ≈ 1239.84 / λ₀ (nm)

c = 299,792,458 m/s and h = 6.62607015 × 10⁻³⁴ J·s are exact by definition in the SI, as is the elementary charge e = 1.602176634 × 10⁻¹⁹ C used to convert joules to electronvolts (NIST: the SI defining constants). The shortcut 1239.84 eV·nm is h·c/e; the wavelength calculator uses the exact constants instead.

Worked examples (default values of the wavelength calculator)

Sound: the note A4 in air at 20 °C. T = 293.15 K, so v = √(1.4 × 8.314462618 × 293.15 / 0.0289647) = 343.23 m/s. The wavelength is λ = v/f = 343.23 / 440 = 0.78008 m, about 78 cm, and the period is 1/440 = 2.2727 ms. In seawater (1540 m/s) the same note has λ = 3.5 m; pick “Seawater” in the wavelength calculator to check it.

Microwave oven at 2.45 GHz. λ₀ = c/f = 299,792,458 / 2.45 × 10⁹ = 0.12236 m = 12.236 cm, in the microwave band. One photon carries E = h·f = 6.62607015 × 10⁻³⁴ × 2.45 × 10⁹ = 1.6234 × 10⁻²⁴ J = 1.0132 × 10⁻⁵ eV, far too little to break a chemical bond; microwaves heat food by making water molecules rotate.

Green laser at 532 nm (choose “Frequency and energy from wavelength”). f = 299,792,458 / 532 × 10⁻⁹ = 5.6352 × 10¹⁴ Hz = 563.52 THz. E = 3.7339 × 10⁻¹⁹ J = 2.3305 eV per photon, or 224.86 kJ/mol, and the wavenumber is 18,797 cm⁻¹. In glass with n = 1.5 the wavelength shortens to 354.67 nm, but the color is still green because the frequency is unchanged.

The electromagnetic spectrum: bands used by the wavelength calculator

BandVacuum wavelengthFrequencyPhoton energy
Gamma raysbelow 0.01 nmabove 3 × 10¹⁹ Hzabove 124 keV
X-rays0.01 – 10 nm3 × 10¹⁶ – 3 × 10¹⁹ Hz124 eV – 124 keV
Ultraviolet10 – 380 nm (UV-C 100–280, UV-B 280–315, UV-A 315–380)789 THz – 30 PHz3.26 – 124 eV
Visible light380 – 750 nm400 – 789 THz1.65 – 3.26 eV
Infrared750 nm – 1 mm300 GHz – 400 THz1.24 meV – 1.65 eV
Microwaves1 mm – 1 m300 MHz – 300 GHz1.24 µeV – 1.24 meV
Radio wavesabove 1 mbelow 300 MHzbelow 1.24 µeV

Borders between bands are conventions, not physical edges; OpenStax College Physics 2e, section 24.3 gives visible light as roughly 400–750 nm, and the UV sub-bands follow the usual UV-A/B/C split (some standards end UV-A at 400 nm). Inside the visible range the calculator names the color: violet 380–450 nm, blue 450–495, green 495–570, yellow 570–590, orange 590–620 and red 620–750 nm.

Speed of sound in common media for the wavelength calculator

MediumSpeed of sound (m/s)Wavelength of 1 kHz
Air, 0 °C33133.1 cm
Air, 20 °C34334.3 cm
Helium, 0 °C96596.5 cm
Fresh water, 20 °C14801.48 m
Seawater15401.54 m
Aluminum51205.12 m
Steel59605.96 m

Values from OpenStax College Physics 2e, Table 17.1 (longitudinal waves in solids). Sound travels faster in stiffer materials, which is why a train can be heard through the rail before it is heard through the air.

Practical uses of a wavelength calculator

Audio and acoustics. Room modes, speaker spacing and the length of an organ pipe all scale with wavelength; a bass note of 50 Hz is about 6.9 m long. Ultrasound. A 5 MHz medical probe in tissue (1540 m/s) has λ = 0.31 mm, which limits the finest detail it can show. Radio and Wi-Fi. A quarter-wave antenna for 2.4 GHz is about 3.1 cm long. Spectroscopy and chemistry. Photon energy in eV or kJ/mol tells you whether light can excite an electron or break a bond; for absorbance and concentration, use the Beer-Lambert Law Calculator. Physics labs. Resonance tubes and standing waves on strings give λ directly, and the wavelength calculator turns it into a speed.

Common mistakes with a wavelength calculator

Forgetting unit prefixes. 532 nm is 5.32 × 10⁻⁷ m, and 2.45 GHz is 2.45 × 10⁹ Hz; one wrong prefix moves the answer by 1000. Using c for sound or 343 m/s for light. Changing the frequency at a boundary. Between media only speed and wavelength change. Temperature in °C inside the square root. The speed of sound needs kelvin; the wavelength calculator converts it. Mixing photon energy per photon and per mole. Multiply by Avogadro’s number, 6.02214076 × 10²³, to go from J per photon to J/mol.

Related calculators

More in Physics Calculators: the Pressure Calculator covers fluids at rest. Convert speeds with the Speed Converter and temperatures with the Temperature Converter; write very large or small results with the Scientific Notation Calculator. For travel time of a wave over a distance, use the Speed Distance Time Calculator.

Frequently asked questions

How do you calculate wavelength?

Divide the wave speed by the frequency: λ = v/f. For light in vacuum v = c = 299,792,458 m/s; for sound in air at 20 °C v ≈ 343 m/s. The wavelength calculator does this with unit conversion.

How do I convert wavelength to frequency?

f = v/λ. For light, f = 299,792,458 / λ in meters; 500 nm gives 5.996 × 10¹⁴ Hz (599.6 THz).

How do I find photon energy from wavelength?

E = h·c/λ. In practical units, E (eV) = 1239.84 / λ (nm), so 500 nm light carries 2.48 eV per photon.

Does wavelength change when light enters water or glass?

Yes. The frequency stays the same, the speed drops to c/n and the wavelength shortens to λ₀/n. In water (n = 1.333) a 600 nm beam has a wavelength of 450 nm. Enter n in the wavelength calculator to see both values.

Why does the speed of sound depend on temperature?

In a gas, sound travels through molecular collisions, and molecules move faster at higher temperature. The speed grows with the square root of the absolute temperature, about 0.6 m/s per °C near room temperature.

Is this wavelength calculator free?

Yes. It runs in your browser, needs no sign-up and does not store the values you enter.

Results are for study, homework and lab work; they use ideal textbook models, so check important results before you rely on them. Back to physics calculators or CalcSwiftly home.

Reviewed by: CalcSwiftly · Last reviewed: