How do you determine the charge of an ion?

The charge of an ion is a result of the atom gaining or losing electrons. Determining this is the difference between the number of protons and the current number of electrons. For instance, an atom of potassium that has lost an electron would have a +1 charge.