The formal charge is the charge assigned to an atom in a molecule based on the assumption that electrons in all chemical bonds are evenly shared across atoms, independent of relative electronegativity.
It is the difference between the number of valence electrons an atom has in its neutral free state and the number assigned to it in a Lewis structure.
The formula for formal charge:
Here, is the formal charge, is the number of valence electrons, is the number of nonbonding valence electrons and is total number of electrons shared in bonds.
Charge of Sulfur atom in Sulfur trioxide
The valence electron of the sulfur atom is six.
Structure of Sulfur trioxide :
The number of nonbonding valence electron is zero.
The total number of electrons shared in bonds are twelve.