Employing hydrodynamic simulations of structure formation in a \Lambda CDM cosmology , we study the history of cosmic star formation from the “ dark ages ” at redshift z \sim 20 to the present . In addition to gravity and ordinary hydrodynamics , our model includes radiative heating and cooling of gas , star formation , supernova feedback , and galactic winds . By making use of a comprehensive set of simulations on interlocking scales and epochs , we demonstrate numerical convergence of our results on all relevant halo mass scales , ranging from 10 ^ { 8 } to 10 ^ { 15 } h ^ { -1 } { M } _ { \odot } . The predicted density of cosmic star formation , \dot { \rho } _ { \star } ( z ) , is broadly consistent with measurements , given observational uncertainty . From the present epoch , \dot { \rho } _ { \star } ( z ) gradually rises by about a factor of ten to a peak at z \sim 5 - 6 , which is beyond the redshift range where it has been estimated observationally . In our model , fully 50 % of the stars are predicted to have formed by redshift z \simeq 2.14 , and are thus older than 10.4 Gyr , while only 25 % form at redshifts lower than z \simeq 1 . The mean age of all stars at the present is about 9 Gyr . Our model predicts a total stellar density at z = 0 of \Omega _ { \star } = 0.004 , corresponding to about 10 % of all baryons being locked up in long-lived stars , in agreement with recent determinations of the luminosity density of the Universe . We determine the “ multiplicity function of cosmic star formation ” as a function of redshift ; i.e . the distribution of star formation with respect to halo mass . At redshifts around z \simeq 10 , star formation occurs preferentially in halos of mass 10 ^ { 8 } -10 ^ { 10 } h ^ { -1 } { M } _ { \odot } , while at lower redshifts , the dominant contribution to \dot { \rho } _ { \star } ( z ) comes from progressively more massive halos . Integrating over time , we find that about 50 % of all stars formed in halos less massive than 10 ^ { 11.5 } h ^ { -1 } { M } _ { \odot } , with nearly equal contributions per logarithmic mass interval in the range 10 ^ { 10 } -10 ^ { 13.5 } h ^ { -1 } { M } _ { \odot } , making up \sim 70 \% of the total . We also briefly examine possible implications of our predicted star formation history for reionisation of hydrogen in the Universe . According to our model , the stellar contribution to the ionising background is expected to rise for redshifts z > 3 , at least up to redshift z \sim 5 , in accord with estimates from simultaneous measurements of the H and He opacities of the Lyman- \alpha forest . This suggests that the UV background will be dominated by stars for z > 4 , provided that there are not significantly more quasars at high-z than are presently known . We measure the clumping factor of the gas from the simulations and estimate the growth of cosmic H II regions , assuming a range of escape fractions for ionising photons . We find that the star formation rate predicted by the simulations is sufficient to account for hydrogen reionisation by z \sim 6 , but only if a high escape fraction close to unity is assumed .