The oxidation number of oxygen in compounds is usually -2, but it is -1 in peroxides. The sum of the oxidation numbers of all the atoms in a neutral compound is 0. The oxidation number of H is +1 (Rule 1). If you know that H₂O₂ is hydrogen peroxide, you can immediately assign oxygen the ON = -1.