Abstract. In this talk I will discuss the results of our recent numerical simulations (Brandenburg & Kahniashvili 2016) of decaying hydrodynamic and magnetohydrodynamic turbulence. The classification of our time-dependent solutions by their evolutionary tracks (in parametric plots between instantaneous scaling exponents) will be presented. As an application of our results to cosmology, I will discuss the evolution of primordial magnetic fields since its generation. In particular, I will address the inflationary magnetogenesis, that implies the scale invariant magnetic field generation. I will show that if the helical inflationary magnetic fields are present in the universe, the measurement of the helicity of such fields can be used to determine the beginning of inflation, while the upper bounds from the observational data an be used to derive constraints on the minimal duration of inflation.