The formal charge of an atom in a polyatomic molecule or ion may be defined as the difference between the number of valence electrons of that atom in an isolated or free state and the number of electrons assigned to that atom in the Lewis structure.
Step2. Formula of formal charge
Formal charge (F.C.) on an atom in a Lewis structure=
Step3. Formal charge of
Total number of valence electrons on carbon is four.
Total number of valence electrons on oxygen is six