Photon Energy and Frequency Calculator
Converts a photon's wavelength to its energy in joules or electron-volts, accounting for the refractive index of the medium. Use it when designing optical systems, LED devices, or studying light–matter interactions.
Last updated: September 2026
Formula below · 2 sources (NIST, Wikipedia) · Updated Sep 2026
Compare with similar
About this calculator
A photon's energy is fixed by its frequency, E = h·ν, and the frequency does not change when light enters a medium; only the speed and wavelength do. If λ is the wavelength measured inside a medium of refractive index n, the vacuum wavelength is n·λ, so E = h·c / (n·λ), where h = 6.626×10⁻³⁴ J·s and c = 2.998×10⁸ m/s. In electron-volts, E (eV) = 1239.84 / (n · λ in nm). Use n = 1 for a vacuum (or air) wavelength. Because ν = c/(n·λ), this is exactly E = h·ν. This relationship underpins spectroscopy, photovoltaics, and optical fibre design.
How to use
Suppose a photon has wavelength λ = 500 nm measured inside glass with refractive index n = 1.5, and you want the energy in eV. Its vacuum wavelength is 1.5 × 500 = 750 nm, so E = 1239.84 / 750 ≈ 1.65 eV (in joules, 6.626×10⁻³⁴ × 2.998×10⁸ / (750×10⁻⁹) ≈ 2.65×10⁻¹⁹ J). Enter wavelength = 500, refractive index = 1.5, select eV, and the calculator returns 1.65 eV. With n = 1 the same 500 nm wavelength gives 2.48 eV.
Frequently asked questions
How does the refractive index affect photon energy in a medium?
When light travels through a medium with refractive index n > 1, its speed and wavelength both decrease by a factor of n while its frequency stays constant. Because energy E = h·ν, the photon's energy is unchanged relative to its frequency; however, if you measure the spatial wavelength inside the medium and plug it into E = hc/λ, you must multiply by n to get the correct result. This calculator handles that correction automatically so you can enter the in-medium wavelength directly.
What is the difference between photon energy in joules and in electron-volts?
One electron-volt (eV) equals 1.602×10⁻¹⁹ joules — the energy gained by one electron moving through a 1 V potential difference. Joules are the SI unit and suit engineering calculations involving power or heat, while eV are more intuitive for atomic and optical physics because visible photons carry energies of roughly 1.8–3.1 eV. The calculator lets you switch between units so you can match the conventions of your field without manual conversion.
Why do optical engineers need to calculate photon energy from wavelength?
Photon energy determines whether a photon can excite a particular electronic transition, be absorbed by a semiconductor, or damage a biological sample. LED and laser diode design requires matching the photon energy to the semiconductor band gap, which is typically quoted in eV. Solar cell efficiency analysis uses the photon energy spectrum to determine what fraction of sunlight can be converted. Having a quick wavelength-to-energy converter avoids repeated manual use of E = hc/λ and reduces unit-conversion errors.