In chemistry, a formal charge, in the covalent view of chemical bonding, is the hypothetical charge assigned to an atom in a molecule, assuming that electrons in all chemical bonds are shared equally between atoms, regardless of relative electronegativity. In simple terms, formal charge is the difference between the number of valence electrons of an atom in a neutral free state and the number assigned to that atom in a Lewis structure. When determining the best Lewis structure for a molecule, the structure is chosen such that the formal charge on each of the atoms is as close to zero as possible.