Recent advances in mean-field theory are reviewed and applications to the Sun, late-type stars, accretion disks, galaxies, and the early Universe are discussed. We focus particularly on aspects of spatio-temporal nonlocality, which provided some of the main new qualitative and quantitative insights that emerged from applying the test-field method to magnetic fields of different length and timescales. We also review the status of nonlinear quenching and the relation to magnetic helicity, which is an important observational diagnostic of modern solar dynamo theory. Both solar and some stellar dynamos seem to operate in an intermediate regime that has not yet been possible to model successfully. This regime is bracketed by antisolar-like differential rotation on one end and stellar activity cycles belonging to the superactive stars on the other. The difficulty in modeling this regime may be related to shortcomings in modelling solar/stellar convection. On galactic and extragalactic length scales, the observational constraints on dynamo theory are still less stringent and more uncertain, but recent advances both in theory and observations suggest that more conclusive comparisons may soon be possible also here. The possibility of inversely cascading magnetic helicity in the early Universe is particularly exciting in explaining the recently observed lower limits of magnetic fields on cosmological length scales. Such magnetic fields may be helical with the same sign of magnetic helicity throughout the entire Universe. This would be a manifestation of parity breaking. † Email address for correspondence: brandenb@nordita.org † In the following, we continue using the lowercase symbols u and b instead of U ′ and B ′ to denote fluctuations of U and B.