We study the effect of electron interaction on the spin splitting and the g factor in graphene in a perpendicular magnetic field using the Hartree and the Hubbard approximations within the Thomas-Fermi model. We found that the effective g factor is enhanced in comparison to its free-electron value g = 2 and oscillates as a function of the filling factor ν in the range 2 g * 4 reaching maxima at ν = 4N = 0, ± 4, ± 8, . . . and minima at ν = 4 N + 1 2 = ±2, ± 6, ± 10, . . ., with N being the Landau level index. We outline the role of charged impurities in the substrate, which are shown to suppress the oscillations of the g * factor. This effect becomes especially pronounced with the increase of the impurity concentration, when the effective g factor becomes independent of the filling factor, reaching a value of g * ≈ 2.3. A relation to the recent experiment is discussed.