We present the results of an analysis of the HST–WFPC2 observations of the interacting galaxy M51 . From the observations in 5 broadband filters ( UBVRI ) and two narrowband filters ( H \alpha and [ OIII ] ) we study the cluster population in a region of 3.2 \times 3.2 kpc ^ { 2 } in the inner spiral arms of M51 , at a distance of about 1 to 3 kpc from the nucleus . We found 877 cluster candidates and we derived their ages , initial masses and extinctions by means of a comparison between the observed spectral energy distribution and the predictions from cluster synthesis models for instantaneous star formation and solar metallicity . The lack of [ OIII ] emission in even the youngest clusters with strong H \alpha emission , indicates the absence of the most massive stars and suggests a mass upper limit of about 25 to 30 M _ { \odot } . The mass versus age distribution of the clusters shows a drastic decrease in the number of clusters with age , much more severe than can be expected on the basis of evolutionary fading of the clusters . This indicates that cluster dispersion is occurring on a timescale of 10 Myr or longer . The cluster initial mass function has been derived from clusters younger than 10 Myr by a linear regression fit of the cumulative mass distribution . This results in an exponent \alpha = - d \log~ { } N ( M ) / d \log~ { } ( M ) = 2.1 \pm 0.3 in the range of 2.5 ~ { } 10 ^ { 3 } < M < 5 ~ { } 10 ^ { 4 } ~ { } \mbox { $M _ { \odot } $ } but with an overabundance of clusters with M > 2 ~ { } 10 ^ { 4 } M _ { \odot } . In the restricted range of 2.5 ~ { } 10 ^ { 3 } < M < 2 ~ { } 10 ^ { 4 } M _ { \odot } we find \alpha = 2.0 \pm 0.05 . This exponent is very similar to the value derived for clusters in the interacting Antennae galaxies , and to the exponent of the mass distribution of the giant molecular clouds in our Galaxy . To study the possible effects of the interaction of M51 with its companion NGC 5195 about 400 Myr ago , which triggered a huge starburst in the nucleus , we determined the cluster formation rate as a function of time for clusters with an initial mass larger than 10 ^ { 4 } M _ { \odot } . There is no evidence for a peak in the cluster formation rate at around 200 to 400 Myr ago within 2 \sigma accuracy , i.e . within a factor two . The formation rate of the detected clusters decreases strongly with age by about a factor 10 ^ { 2 } between 10 Myr and 1 Gyr . For clusters older than about 150 Myr this is due to the evolutionary fading of the clusters below the detection limit . For clusters younger than 100 Myr this is due to the dispersion of the clusters , unless one assumes that the cluster formation rate has been steadily increasing with time from 1 Gyr ago to the present time .