Wavelength to Energy Calculator (Photon Energy in eV and J)

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.

What do you know?
Pick one quantity you have: wavelength, frequency, or energy. The calculator computes the other two.
Enter a positive number. Scientific notation is accepted, like 5.32e2 or 3.2e-19. Commas and spaces are ignored.
Choose the unit that matches your input. Common choices are nm for wavelength, THz for frequency, and eV for energy.
Advanced options
Use 1.000 for vacuum or air. In a medium, frequency stays the same and wavelength becomes wavelength_medium = wavelength_vacuum / n.
Significant figures are common in science. Decimal places can be easier to read for nm or eV outputs.
For significant figures, this is total significant digits. For decimal places, this is digits after the decimal point.
Calculating…

Results

Photon energy (J)
–
Energy of one photon in joules (SI).
Photon energy (eV)
–
1 eV is the energy gained by an electron across 1 volt.
Wavelength (vacuum) (m)
–
Vacuum wavelength used in E = h c / wavelength.
Wavelength (vacuum) (nm)
–
Same vacuum wavelength in nanometers.
Frequency (Hz)
–
Frequency does not change when light enters a different medium.
Frequency (THz)
–
Visible light is hundreds of THz.
Wavelength in medium (nm)
–
Shown only if you enter n. wavelength_medium = wavelength_vacuum / n.
Quick check: E(eV) * wavelength(nm)
–
In vacuum this should be about 1239.84198 eV*nm.
Where is this wavelength?
Enter a wavelength to see position.
380 nm 500 600 750 nm
UVVisibleIR

How to Use

  1. In "What do you know?" choose Wavelength, Frequency, or Energy (pick the one value you are given).
  2. Type your number in "Known value" (use scientific notation if needed, like 5.32e2 or 3.2e-19).
  3. Select the matching unit in "Unit for known value" (for example, nm for wavelength, THz for frequency, or eV for energy).
  4. Optional: open Advanced and enter refractive index n (use 1.000 for vacuum/air). This only changes the reported wavelength in the medium.
  5. Optional: in Advanced choose a rounding style (significant figures or decimal places) and set the digits.
  6. 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).
  7. 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.

Sources
  1. CODATA or SI exact values: Planck constant h, speed of light c, elementary charge e
  2. NIST speed of light value
  3. NIST elementary charge value (e)
  4. Photon: Encyclopædia Britannica
  5. Did we solve your problem today?