Aims. The Sun-Earth transit time of interplanetary coronal mass ejections (ICMEs) is one of central issues of space weather forecasting. Our aim is to find out to what degree the ICME transit time depends on the solar wind speed. Methods. Two samples of coronal mass ejections (CMEs) and the associated ICMEs are used to analyze the relationship between transit times, T T , and the solar wind speed, w, measured at 1 AU ahead and behind the ICME. Results. We found a distinct correlation T T (w), clearly showing that the transit time is dependent not only on the ICME take-off speed v CME , but also on the solar wind speed. After dividing the samples into the solar wind speed bins w ≤ 400, 400 < w ≤ 500, and w > 500 km s −1 , we compared the corresponding T T (v CME ) correlations to find that the transit times in the case of w ≤ 400 km ssubset are longer, on average, for about 20-30 h than in the case of the w > 500 km s −1 subset. Conclusions. Since the ICME transit time is significantly influenced by the solar wind speed, this effect should be included in statistical and kinematical methods of the space weather forecast.