Net charge is all about the balance between protons and electrons.
In a neutral atom, the number of protons, which is given by the element's atomic number, is equal to the number of electrons. Protons are positively charged particles that carry a
So, for instance, you have a neutral magnesium atom (
As you can see, the charges balance out and the atom's net charge is zero.
SInce magnesium is in group 2, it will give up two electrons to complete its octet. Now, the total number of electrons it will have will be
This means that the number of protons is no longer equal to the number of electrons
Now the atom has a
Likewise, if you take chlorine, for example, its atomic number is
The atom's net charge will now be
This is how you determine the net charge of any element.
All you have to do is keep track of how many electrons it has (because the number of protons will never change, or else you'd be dealing with another element altogether) and add the positive charge of the protons to the negative charge of the electrons.
A positive sum means a cation (positively charged ion), and a negative sum means an anion (negatively charged ion).
Here's a nice video on the subject: