We calculate the mass function evolution in a ACDM model by means of the excursion set model and an improved version of the barrier shape obtained in Del Popolo and Gambera [Astron. Astrophys. 337, 96 (1998)], which implicitly takes account of total angular momentum acquired by the protostructure during evolution and of a nonzero cosmological constant. We compare the result with Reed et al. [Mon. Not. R. Astron. Soc. 346, 565 (2003)], who used a high-resolution ACDM numerical simulation to calculate the mass function of dark matter haloes down to the scale of dwarf galaxies, back to a redshift of 15. We show that the mass function obtained in the present paper gives similar predictions to the Sheth and Tormen mass function, but it does not show the overprediction of extremely rare objects shown by the Sheth and Tormen mass function. The results confirm previous findings that the simulated halo mass function can be described solely by the variance of the mass distribution, and thus has no explicit redshift dependence.