how many molecules of water in order to produce 37 grams of oxgen? give me the Formula

You need more than the formula. You need a definition of mole.

The mass of one mole of O2 is 32 grams, and one mole of anything has 6.02x1023 molecules.

molecules/6.02E23 = 37/32