With the disclaimer than I am not a scientist, my understanding is that the earth developed a surplus of atmospheric oxygen over the eons because a small percentage of photosynthetic organisms were fossilized instead of decomposing (therefore releasing a net production of oxygen). The oxygen produced by forests is a zero gain, since the forests consume their own oxygen through forest fires and decomposition. When we burn fossil fuels, we lose these net oxygen molecules. Does that imply that the world is at risk of running out of atmospheric oxygen? Aside for other environmental concerns, can the continued use of fossil fuels create an oxygen crisis? Put in other words, do the oceans produce enough oxygen to account for our current use of fossil fuels and population growth?
Yes, atmospheric oxygen is being depleted by fossil fuel burning.
Oxygen concentrations are currently declining at roughly 19 per meg per year, or about 4 ppm per year. One "per meg" indicates one molecule out of 1,000,000 oxygen molecules, or roughly one molecule in 4.8 million molecules of air.
- fossil fuel burning is depleting atmospheric oxygen at a rate of almost 1000 tons per second. There are about 32 million seconds in a year, so that somewhere around 30 billion tons of O2 are being converted to CO2 annually.
Because the quantities of O2 are very large the reduction is small in comparison. From same source -
There are about 1,200,000 billion metric tons of O2 in the atmosphere, so we can keep burning fossil fuels at the present rate for 40,000 years before we run out of oxygen. By then, all of the world's fossil fuel supply will have long since been exhausted.
Since pre-industrial times $CO_2$ has increased from 280 to 415 ppm. Considering only carbon (ignoring the hydrogen in hydrocarbons), atmospheric $O_2$ decreased by the same amount, 135 ppm. The remaining FF are not much more than what has been burned, so the $O_2$ consumed will only be a tiny fraction of atmospheric $O_2$:
Oil will end by 2052 – 30 years time
Gas will end by 2060 – 40 years time
Coal will last till 2090 – 70 years time
I think that most fossil carbon is not in concentrated deposits that could be mined, so it is not included in the above estimates.