E = hf = hc/λ · joules and electronvolts

E = h·f = h·c/λ. h = 6.626·10⁻³⁴ J·s. A shorter wavelength = higher frequency = more energy (a violet photon carries more energy than a red one). 1 eV = 1.602·10⁻¹⁹ J.
Light carries energy in packets called photons. The energy of a single photon depends on its frequency (or wavelength):
where (Planck's constant) and . The shorter the wavelength (toward violet and beyond — UV, X-rays), the greater the energy of the photon.
Enter the wavelength (in nm), the frequency, or the energy (in eV) — the calculator converts the remaining quantities, including the energy in joules and electronvolts (). The presets correspond to the colours of visible light.
Blue. It has a shorter wavelength and higher frequency, and energy grows with frequency (E = hf). That is why UV radiation is more dangerous than red light.
A convenient unit of energy in atomic physics: 1 eV = 1.602·10⁻¹⁹ J. It is the energy an electron gains when accelerated through a potential of 1 V. Visible-light photons carry about 1.6–3.3 eV.
Teaching? Embed this calculator on your site.
Free widget — paste it on your school site, blog or notes. It links to the full version.