Formal charge

In chemistry, a formal charge (FC) is the charge assigned to an atom in a molecule, assuming that electrons in a chemical bond are shared equally between atoms, regardless of relative electronegativity. The formal charge of any atom in a molecule can be calculated by the following equation:
 * $$FC = V - (N + {B \over 2}) $$

Where V is the number of valence electrons of the atom in isolation (atom in ground state); N is the number of non-bonding valence electrons on this atom in the molecule; and B is the total number of electrons shared in covalent bonds with other atoms in the molecule. There are two electrons shared per single covalent bond.

Quotes

 * Closely related to the ideas of bond polarity and dipole moment is the concept of assigning formal charges to specific atoms within a molecule, particularly atoms that have an apparently “abnormal” number of bonds. … Formal charges, as the name suggests, are a formalism and don’t imply the presence of actual ionic charges in a molecule. Instead, they’re a device for electron “bookkeeping” and can be thought of in the following way: a typical covalent bond is formed when each atom donates one electron. Although the bonding electrons are shared by both atoms, each atom can still be considered to “own” one electron for bookkeeping purposes.
 * John McMurry, Organic Chemistry 8th ed. (2012), Ch. 2 : Polar Covalent Bonds; Acids and Bases


 * To express the calculations in a general way, the formal charge on an atom is equal to the number of valence electrons in a neutral, isolated atom minus the number of electrons owned by that bonded atom in a molecule. The number of electrons in the bonded atom, in turn, is equal to half the number of bonding electrons plus the nonbonding, lone-pair electrons.
 * John McMurry, Organic Chemistry 8th ed. (2012), Ch. 2 : Polar Covalent Bonds; Acids and Bases