In English: 6 carbon dioxide molecules and 6 water molecules become 1 glucose molecule and 6 dioxygen molecules.
So for each CO2 molecule in, there is one O2 molecule out. Now it's entirely possible that some of the O in O2 comes from the H2O molecules. At most half of it if I know how to count up to twelve.
Edited for clarity.
I thought so too, and this would be true if the reaction happened exactly as the equation describes.
But it turns out there are a bunch of intermediate steps.
The first set is pure hydrolysis:
2H2O + light + depleted energy carriers -> 2O2 + 2H(+) + filled energy carriers (that include 2H)
That oxygen is excreted and ends up in the atmosphere. Then, there’s the transpiration process that takes in CO2 and makes sugar and water again:
3CO2 + filled energy carriers (that include 6H total) + 6H(+) -> C3H6O3 + depleted energy carriers + 3H2O
So really what happens is this:
6CO2 + 12H2O -> C6H12O6 + 6O2 + 6H2O
All the O2 output comes from the 12 H2O input. The 6 H2O output are recreated with half the H from the input 12 H2O but oxygen from from half the 6CO2 input, while the other half of the CO2, combined with 12 H from the 12 H2O input, make the sugar.
Fascinating stuff.
One upshot: all that crap about the water molecules being the same molecules the dinosaurs swam is crap. Any water that’s been through photosynthesis is reconstituted on the molecular level!
I’m not sure if the released oxygen comes from the water or the carbon dioxide but it doesn’t much matter!
Edit: looks like it comes from the water. Cool!