The detection of exoplanets using any method is prone to confusion due to the intrinsic variability of the host star. We investigate the effect of cool starspots on the detectability of the exoplanets around solar-like stars using the radial velocity method. For investigating this activity-caused jitter we calculate synthetic spectra using radiative transfer, known stellar atomic and molecular lines, different surface spot configurations, and an added planetary signal. Here, the methods are described in detail, tested and compared to previously published studies. The methods are also applied to investigate the activity jitter in old and young solar-like stars, and over a solar-like activity cycles. We find that the mean full jitter amplitude obtained from the spot surfaces mimicking the solar activity varies during the cycle approximately between 1 m/s and 9 m/s. With a realistic observing frequency a Neptune mass planet on a one year orbit can be reliably recovered. On the other hand, the recovery of an Earth mass planet on a similar orbit is not feasible with high significance. The methods developed in this study have a great potential for doing statistical studies of planet detectability, and also for investigating the effect of stellar activity on recovered planetary parameters.