The magnetic moment of the electron is m S = − − g S μ μ B S ℏ ℏ , where μ B is the Bohr magneton, S is electron spin, and the g -factor g S is 2 according to Dirac's theory, but due to quantum electrodynamic effects it is slightly larger in reality: 2.002 319 304 36. The deviation from 2 is known as the anomalous magnetic dipole moment.