There are a few exceptions to this rule:
* In peroxides (like H₂O₂), oxygen has an oxidation number of -1.
* In superoxides (like KO₂), oxygen has an oxidation number of -1/2.
* When oxygen is bonded to a more electronegative element (like fluorine in OF₂), it has a positive oxidation number.
However, in the vast majority of compounds, oxygen will have an oxidation number of -2.