A unit of energy used in atomic and nuclear physics. It is defined as the energy acquired by an electron in falling through a potential difference of one volt. One electronvolt is equal to 1.602 × 10−19 joule. Electronvolts are used as a measure of the energy of cosmic rays and high-energy photons. X-rays and gamma rays can have energies of 100 000 eV or more. By comparison, optical photons have energies of 2–3 eV. The rest mass of atomic particles can also be expressed in terms of electronvolts, since mass and energy are equivalent. Hence the rest mass of an electron is about 500 keV and that of protons and neutrons about 1000 MeV. Electronvolts can be converted to wavelength (λ) by the formula λ = 1239.8 nm/eV.