Oxidation State of Oxygen: The Practical Guide Nobody Writes
How to Determine the Oxidation Number Of Oxygen in Any Compound
Oxygen is almost always negative two. That is the rule you memorize. But you will immediately run into exceptions and that is where people lose marks on exams and make mistakes in real lab work. Here is how the method actually works when you are sitting with a structure you have never seen before. Start by assuming oxygen is -2 unless the compound contains fluorine or is a peroxide, superoxide, or ozonide. That is the quick filter. Everything else falls out from there. Work backwards from what you know. Fluorine is always -1. Hydrogen is +1 when bonded to nonmetals. The sum of all oxidation numbers must equal the overall charge on the molecule. Solve for oxygen from there. It is algebra, nothing fancy.
I spent too many years watching grad students mess this up in the first week of organic chemistry lab. They would see O2F2 and immediately assign oxygen as -2, which gives you -4 total from oxygen and then fluorine at -1 makes the math impossible because the molecule is neutral. The correct assignment flips it: fluorine stays at -1 since it is more electronegative, so each oxygen ends up at +1. It is a two-line problem if you remember the priority order. Electronegativity dictates the assignment, not memorized rules. The deeper issue most people miss is that oxidation numbers are formal bookkeeping devices. They do not represent actual charge distribution. In water the oxygen carries roughly -0.83 e- of partial charge from quantum calculations, not a full -2. The oxidation number is a fiction you use to track electron flow in redox reactions. Treat it like a tool, not a physical property. This distinction matters when you move past introductory chemistry. In transition metal oxides like MnO2 the manganese is formally +4 but the bonding has significant covalent character. The electrons are not sitting on the oxygen waiting to be handed off. If you treat oxidation numbers as literal electron locations you will misunderstand reaction mechanisms, especially in catalysis and electrocatalysis where oxygen evolution reactions happen at metal oxide surfaces.
Another thing that trips people up: the peroxide bond itself. In hydrogen peroxide the O-O bond means each oxygen is -1. The oxidation state does not change across that bond because you are assigning electrons to the more electronegative atom and they are equally electronegative. Split it evenly. This is why H2O2 is both an oxidizing and reducing agent. The oxygen can go to -2 or to zero depending on the reaction partner. I ran into a specific case once working on a project involving barium peroxide synthesis. We were trying to calculate theoretical yields and I had to manually assign oxidation states across a multi-step reaction network. The standard rules gave ambiguous results because we had BaO2 reacting with CO2 to form BaCO3 and O2. The peroxide oxygen in BaO2 is -1, the oxygen in CO2 is -2, and the O2 product is zero. Tracking that through required writing out each oxygen atom's starting state individually rather than treating the compound as a single unit. Took about twenty minutes longer than it should have but it caught an error in the stoichiometric ratio that a sloppy calculation would have missed. For the common exceptions you need to know cold:
Get the Full Details

Peroxides like Na2O2, H2O2, BaO2: oxygen is -1. Look for the O-O single bond in the structure. Superoxides like KO2: oxygen is -1/2. The superoxide ion O2- carries an unpaired electron and the charge is delocalized. Ozonides like RbO3: oxygen averages to -1/3 across the three-atom chain.
Oxygen difluoride OF2: oxygen is +2 because fluorine is more electronegative. Dioxygen difluoride O2F2: oxygen is +1 for the same reason. The rest of the time it is -2. That covers the vast majority of compounds you will encounter in standard laboratory work and undergraduate coursework.
Common Mistakes That Waste Time
Assuming oxygen is -2 in every compound containing fluorine. It is not. Fluorine always wins the electronegativity contest. Period. Forgetting that the sum rule applies to the whole molecule including polyatomic ions. If you are working with the permanganate ion MnO4- the oxygens are -2 each giving -8 total and then manganese must be +7 to reach the -1 charge. Students sometimes forget the ion charge and set the sum to zero. Trying to assign oxidation numbers in organometallic complexes without considering the hapticity of ligands. Cyclopentadienyl iron dicarbonyl dimer has complicated electron counting that requires the covalent method rather than simple ionic oxidation states. The oxygen-based ligands are straightforward but the rest of the structure pushes you toward a different bookkeeping system.

The oxidation number method breaks down completely for non-stoichiometric compounds and mixed-valence materials. Fe3O4 contains both Fe(II) and Fe(III). You can write it as FeO·Fe2O3 to make it manageable but the formalism is already stretching. Perovskites and spinels get worse from there. If you need accurate electron counting in those systems you should use formal valence methods or computational charge analysis instead.
When to Skip Oxidation Numbers Entirely
If you are dealing with solid state materials, battery cathodes, or any system where the electronic structure is better described by band theory, oxidation numbers give you a rough sketch at best. They tell you the formal electron transfer count but nothing about the actual density of states or how the material will behave under cycling. In those cases Bader charge analysis or DFT-derived oxidation states are more useful even though they cost significantly more computation time. For routine redox balancing in solution chemistry, the traditional method is fast and reliable. Assign the standard states, set up the algebra, solve. Usually takes under five minutes for anything a student or practicing chemist would encounter outside of specialized research. The overhead of more sophisticated methods is not justified unless you need quantitative accuracy.