Oxidation number denotes the oxidation state of an element in a compound ascertained according to a set of rules formulated on the basis that electron pair in a covalent bond belongs entirely to a more electronegative element.
If two or more than two atoms of an element are present in the molecule/ion such as , the oxidation number of the atom of that element will then be the average of the oxidation number of all the atoms of that element.
The oxidation number of all iodine atoms in :
Let the oxidation number of iodine .
Charge on potassium
So, the average oxidation number of iodine in is .