Electrons orbit around the nuclei of atoms in orbitals. The lowest, "default" orbitals are called the ground state. When energy is added to the system, such as by running an electrical current through a lightbulb filament, electrons are "excited" to higher orbitals. The energy that would be required to excite an electron so much that it is completely removed from an atom is called either the "ionization potential" or "ionization energy," though the latter is the more up to date term. For individual atoms, it is measured in electron volts (eV). On a larger scale, it is measured in kilojoules per mole (kJ/mol).
Calculating Ionization Energy
Look up the ionization energy per atom in the periodic table linked in the resources section. Click on the element in question and write down the value under "First ionization." It would be possible to calculate this value knowing only the number of protons in the atom in question and the distance to the first orbital, but any source which contains this information will also give the first ionization energy.
Determine how many moles of the element are being ionized. If you only know the mass, you must look up the atomic mass, also on most periodic tables. Divide the mass being ionized, in grams, by the atomic mass number. If you have 24 grams of oxygen, for example, which has an atomic mass of 16, you have 1.5 moles.
Multiply the ionization energy you looked up by 96.485. 1 eV/particle is equal to 96.485 kJ/mol. The result is the molar ionization energy in kilojoules per mole.
Multiply the answer from step three, in kJ/mol, by the number of moles you determined in step two. The answer is the total ionization energy of your sample, in kJ.