Context : Cosmic ray electrons ( CREs ) are a crucial part of the ISM and are observed via synchrotron emission . While much modelling has been carried out on the CRE distribution and propagation of the Milky Way , little has been done on normal external star-forming galaxies . Recent spectral data from a new generation of radio telescopes enable us to find more robust estimations of the CRE propagation . Aims : To model the synchrotron spectral index of M 51 using the diffusion energy-loss equation and to compare the model results with the observed spectral index determined from recent low-frequency observations with LOFAR . Methods : We solve the time-dependent diffusion energy-loss equation for CREs in M 51 . This is the first time that this model for CRE propagation has been solved for a realistic distribution of CRE sources , which we derive from the observed star formation rate , in an external galaxy . The radial variation of the synchrotron spectral index and scale-length produced by the model are compared to recent LOFAR and older VLA observational data and also to new observations of M 51 at 325 MHz obtained with the GMRT . Results : We find that propagation of CREs by diffusion alone is sufficient to reproduce the observed spectral index distribution in M 51 . An isotropic diffusion coefficient with a value of 6.6 \pm 0.2 \times 10 ^ { 28 } \mathrm { cm } ^ { 2 } \mathrm { s } ^ { -1 } is found to fit best and is similar to what is seen in the Milky Way . We estimate an escape time of 11 \mathrm { Myr } from the central galaxy to 88 \mathrm { Myr } in the extended disk . It is found that an energy dependence of the diffusion coefficient is not important for CRE energies in the range 0.01 \mathrm { GeV } – 3 \mathrm { GeV } . We are able to reproduce the dependence of the observed synchrotron scale-lengths on frequency , with l \propto \nu ^ { -1 / 4 } in the outer disk and l \propto \nu ^ { -1 / 8 } in the inner disk . Conclusions :