Sometimes atoms engage in covalent bonding by contributing more or less electrons than they have in their valence shell (we’ll examine the processes that lead to the loss or gain of electrons later). For example nitrogen can actually combine with four hydrogen atoms to form a stable species called ammonium ion (NH4). In this species, nitrogen still shares eight electrons, but contributes only four of its own. Since electrons are negative charges and this nitrogen is missing one, it acquires a net charge of +1 (in other words, there is a proton in the nucleus that is not matched by an electron outside the nucleus). This net charge is referred to as formal charge, and it must be indicated as part of the notation for the NH4 formula, as shown.
In another species known as a carbanion, carbon forms only three bonds and carries a pair of unshared electrons. In this species, carbon shares eight electrons, but it is contributing five of its own. Since it has a surplus of one electron (a negative charge), it carries a net charge of -1.
Obviously the concept of formal charge refers to a specific atom. Formulas should show these charges on the atoms where they belong. Other examples of covalent species with charged atoms are the hydronium ion and the amide ion.