Aims. We evaluate the radial velocity (RV) information content and achievable precision on M0-M9 spectra covering the ZYJHK bands. We do so while considering both a perfect atmospheric transmission correction and discarding areas polluted by deep telluric features, as done in previous works. Methods. To simulate the M-dwarf spectra, PHOENIX-ACES model spectra were employed; they were convolved with rotational kernels and instrumental profiles to reproduce stars with a v sin i of 1.0, 5.0, and 10.0 km s −1 when observed at resolutions of 60 000, 80 000, and 100 000. We considered the RV precision as calculated on the whole spectra, after discarding strongly polluted areas, and after applying a perfect telluric correction. In the latter option, we took into account the reduction in the number of recorded photons due to a transmittance lower than unity and considered its effect on the noise of the recorded spectra. In our simulations we paid particular attention to the details of the convolution and sampling of the spectra, and we discuss their impact on the final spectra. Results. Our simulations show that the most important parameter ruling the difference in attainable precision between the considered bands is the spectral type. For M0-M3 stars, the bands that deliver the most precise RV measurements are the Z, Y, and H band, with relative merits depending on the parameters of the simulation. For M6-M9 stars, the bands show a difference in precision that is within a factor of ∼2 and does not clearly depend on the band; this difference is reduced to a factor smaller than ∼1.5 if we consider a non-rotating star seen at high resolution. We also show that an M6-M9 spectrum will deliver a precision about two times better as an M0-M3 spectra with the same signal-to-noise ratio. Finally, we note that the details of modeling the Earth atmosphere and interpreting the results have a significant impact on which wavelength regions are discarded when setting a limit threshold at 2−3%. The resolution element sampling on the observed spectra plays an important role in the atmospheric transmission characterization. As a result of the multiparameter nature of the problem, it is very difficult to precisely quantify the impact of absorption by the telluric lines on the RV precision, but it is an important limiting factor to the achievable RV precision.