The sum of the oxidation states of all the elements in a species will always equal the charge it has.
For example, let’s look at MnO4^-:
Let’s call the oxidation state of Mn x. Oxygen in compounds almost always has a -2 oxidation state, so:
Charge = sum of oxidation states
==> -1 = 4(-2) + x
-1 = x - 8
+7 = x
So using this approach, can you work out the oxidation state(s) of Cr in CrO2F2 and Cr2O7^2-and the oxidation state of Mn in [MnCl6]^2-?
You can also use a similar rule with complex ions. The cyanide ion (CN^-) has a charge of -1.