We search for low-mass companions of M dwarfs and characterize their multiplicity fraction with the purpose of helping in the selection of the most appropriate targets for the CARMENES exoplanet survey. We obtained high-resolution images in the I band with the lucky imaging instrument FastCam at the 1.5m Telescopio Carlos Sanchez for 490 mid- to late-M dwarfs. For all the detected binaries, we measured angular separations, position angles, and magnitude differences in the I band. We also calculated the masses of each individual component and estimated orbital periods, using the available magnitude and colour relations for M dwarfs and our own M_J_-spectral type and mass-M_I_ relations. To avoid biases in our sample selection, we built a volume-limited sample of M0.0-M5.0 dwarfs that is complete up to 86% within 14pc.