The magnetic moment of the electron, expressed by the g-factor in units of the Bohr magneton, is a key quantity in the theory of quantum electrodynamics (QED). Experiments using single particles confined in Penning traps have provided very precise values of the g-factor for the free electron as well as the electron bound in hydrogen-like ions. In this paper the status of these experiments is reviewed. The results allow testing calculations of higher order Feynman diagrams. Comparison of experimental and theoretical results for free and bound particles show no discrepancy within the limits of error, thus representing to date the most sensitive test of QED. Moreover, the g-factor provides a unique access to fundamental constants, as e.g. the electron mass or the fine structure constant.