How would you calculate oxidation number?
Oxidation number by definition is the charge left on the central atom, when each of the bonding pairs are broken, and the charge goes to the most electronegative atom.
I will take a simple example,
I urge to look at the other questions on these boards where oxidation numbers are calculated step by step and assigned. Remember though, that oxidation numbers are a formalism; they don't really have much physical or chemical significance.