The charge of a magnesium ion is 2+.
Magnesium (Mg) is an element in the alkaline earth metals group of the periodic table. It has an atomic number of 12, which means it has 12 protons and 12 electrons in its neutral state. To achieve a stable electron configuration, magnesium tends to lose two electrons from its outermost shell. When it loses these two electrons, it forms a magnesium ion with a charge of 2+ (Mg2+).
This 2+ charge is due to the fact that the magnesium ion now has 12 protons (which are positively charged) and only 10 electrons (which are negatively charged), resulting in a net charge of +2.