Convert one known light value (wavelength, frequency, or energy) into the other two using the standard light equations, with an optional refractive index for wavelength in a medium.
Advanced options
Results
How to Use
- In "What do you know?" choose Wavelength, Frequency, or Energy (pick the one value you are given).
- Type your number in "Known value" (use scientific notation if needed, like 5.32e2 or 3.2e-19).
- Select the matching unit in "Unit for known value" (for example, nm for wavelength, THz for frequency, or eV for energy).
- Optional: open Advanced and enter refractive index n (use 1.000 for vacuum/air). This only changes the reported wavelength in the medium.
- Optional: in Advanced choose a rounding style (significant figures or decimal places) and set the digits.
- Click Calculate to see energy (J and eV), wavelength (m and nm), frequency (Hz and THz), and the quick-check product E(eV) * lambda(nm).
- If you see an error, fix what it says (most often: value must be greater than 0, unit does not match your chosen mode, or n must be greater than 0).
Methodology & Sources
What this converts: A photon is a single packet of light. Its wavelength (how far the wave goes in one cycle), frequency (how many cycles per second), and energy are linked. This calculator uses vacuum relations by default, which is what most physics and chemistry problems assume unless a medium is stated.
Constants used (SI exact values): Planck constant h = 6.62607015e-34 J*s [1], speed of light in vacuum c = 299792458 m/s [2], elementary charge e = 1.602176634e-19 C [3]. The charge e is also the conversion between joules and electronvolts because 1 eV = e joules.
Main equations (vacuum): If vacuum wavelength is known, photon energy in joules is E = (h * c) / lambda, and frequency is f = c / lambda. If frequency is known, energy is E = h * f and vacuum wavelength is lambda = c / f. These come from the Planck-Einstein relation between photon energy and frequency (E = h f) and the wave relation between speed, frequency, and wavelength [4].
Energy unit conversion: After computing energy in joules, energy in electronvolts is E_eV = E_J / e, where e is the elementary charge [3].
Medium option (refractive index n): If you provide refractive index n, the calculator reports wavelength in the medium as lambda_medium = lambda_vacuum / n. Frequency stays the same when light enters an ideal transparent medium, so photon energy stays the same too; only the wavelength in the medium changes.
Quick-check constant (why ~1240): Using the exact constants, (h*c/e)*1e9 gives a convenience constant near 1239.84198 eV*nm. That is why the shortcut E(eV) = 1239.84198 / lambda(nm) works in vacuum. The calculator also outputs the product E(eV) * lambda(nm) so you can quickly check unit choices and catch mistakes.
Validation and edge cases: The known value must be a real number greater than 0. Inputs that parse to NaN or Infinity (blank, non-numeric text) are rejected with a specific message. Refractive index n must be greater than 0 to avoid divide-by-zero. Calculations keep full precision internally and only round final displayed results based on your rounding settings.