β -decay, a process that changes a neutron into a proton (and vice versa), is the dominant decay mode of atomic nuclei. This decay offers a unique window to physics beyond the standard model, and is at the heart of microphysical processes in stellar explosions and the synthesis of the elements in the Universe. For 50 years, a central puzzle has been that observed β-decay rates are systematically smaller than theoretical predictions. This was attributed to an apparent quenching of the fundamental coupling constant gA≃ 1.27 in the nucleus by a factor of about 0.75 compared to the β-decay of a free neutron. The origin of this quenching is controversial and has so far eluded a first-principles theoretical understanding. Here we address this puzzle and show that this quenching arises to a large extent from the coupling of the weak force to two nucleons as well as from strong correlations in the nucleus. We present state-of-the-art computations of β-decays from light to heavy nuclei. Our results are consistent with experimental data, including the pioneering measurement for 100Sn. These theoretical advances are enabled by systematic effective field theories of the strong and weak interactions combined with powerful quantum many-body techniques. This work paves the way for systematic theoretical predictions for fundamental physics problems. These include the synthesis of heavy elements in neutron star mergers and the search for neutrino-less double-β-decay, where an analogous quenching puzzle is a major source of uncertainty in extracting the neutrino mass scale.