You determine the valence electrons by using the Periodic Table.
Let's assume you're using a table that has the groups numbered 1-18.
The electron configurations of ions are those of the neutral atoms plus or minus a number of electrons equal to the charge on the ion.
Groups 15 to 17
Write the electronic structure for the neutral atom. Then add electrons to get a total of eight.
E.g., for "Cl"^-Cl−, we get
"Cl": 1s^2 color(white)(l)2s^2 2p^6color(white)(l) 3s^2 3p^5Cl:1s2l2s22p6l3s23p5 but "Cl"^-Cl− has one more electron.
∴ "Cl"^"-": 1s^2 color(white)(l)2s^2 2p^6 color(white)(l)3s^2 3p^6Cl-:1s2l2s22p6l3s23p6
Groups 1, 2, and 13
Write the electronic structure for the neutral atom. Then remove the outermost electrons.
For "Na"^+Na+:
"Na": 1s^2 color(white)(l)2s^2 2p^6 color(white)(l)3sNa:1s2l2s22p6l3s, but "Na"^+Na+ has one less electron
∴ "Na"^+: 1s^2 color(white)(l)2s^2 2p^6Na+:1s2l2s22p6
Groups 3 to 12
Remove ss electrons before dd electrons.
E.g., for "Cr"^"3+"Cr3+
"Cr": 1s^2 color(white)(l)2s^2 2p^6 color(white)(l)3s^2 3p^6 color(white)(l)4s 3d^5Cr:1s2l2s22p6l3s23p6l4s3d5
∴ "Cr"^"3+": 1s^2 color(white)(l)2s^2 2p^6 color(white)(l)3s^2 3p^6 color(white)(l)3d^3Cr3+:1s2l2s22p6l3s23p6l3d3
You remove the 4s4s electron first, followed by two of the 3d3d electrons.
EXAMPLES
Write the electron configurations for "O"^"2-"O2-, "Ca"^"2+"Ca2+, and "Zn"^"2+"Zn2+.
**Solutions **
"O": 1s^2 color(white)(l)2s^2 2p^4O:1s2l2s22p4
"O"^"2-": 1s^2 color(white)(l)2s^2 2p^6O2-:1s2l2s22p6
"Ca": 1s^2 color(white)(l)2s^2 2p^6 color(white)(l)3s^2 3p^6 color(white)(l)4s^2Ca:1s2l2s22p6l3s23p6l4s2
"Ca"^"2+": 1s^2color(white)(l) 2s^2 2p^6 color(white)(l)3s^2 3p^6Ca2+:1s2l2s22p6l3s23p6
"Zn": 1s^2 color(white)(l)2s^2 2p^6 color(white)(l)3s^2 3p^6 color(white)(l)4s^2 3d^10Zn:1s2l2s22p6l3s23p6l4s23d10
"Zn"^"2+": 1s^2 color(white)(l)2s^2 2p^6 color(white)(l)3s^2 3p^6 color(white)(l)3d^10Zn2+:1s2l2s22p6l3s23p6l3d10