Let x be the oxidation number of Fe in K2Fe–––O4.
Since the overall charge on the compound is 0, the sum of oxidation states of all elements in it should be equal to 0.
Therefore, 2+x+4(−2)=0
or, x=+6
Hence, the oxidation number of Fe in K2Fe–––O4 is +6.