To
deduce the oxidation state at the various atoms in a covalently bonded compound, the compound is viewed as being
ionic with all of the bonding
electrons "belonging"
to the more electronegative atom in the bond.
Thus in water, for the purpose of assigning the oxidation state:

is H and

and H
Each H has no electrons (and is therefore +1)
O has eight electrons (and is therefore -2)
Many compounds and polyatomic ions contain oxygen. Because oxygen is more electronegative than other elements, the
oxidation state of oxygen is nearly always -2.except in peroxides where one of the bonds from each oxygen is to another oxygen (as in H-O-O-H)
and the oxidation state of oxygen is -1 AND in compounds when oxygen is bonded to fluorine (OF2).
For polyatomic ions and compounds having oxygen bonded to a less electronegative element, the
oxidation state of the less electronegative element depends on the
number of bonds to oxygen.
The oxidation state of nitrogen in NO
3– is higher than in NO
2– because there are more bonds from oxygen to nitrogen in NO3– than in NO2–.
The oxidation state of the two sullfur atoms In thiosulfate ion (S
2O
32– which is
–S-SO
32–) is not the same
because the bonding at the two sulfurs are bonded to different numbers of oxygens.
For binary compounds or ions (other than peroxides), the
oxidation state of the atom bonded to oxygen can be
calculated by