You should avoid ejaculation for two to five days before giving a specimen for a semen analysis. Sexual activity leads to ejaculation, which can lower your sperm count temporarily and affect the test results. On the day of the test, you need to collect the sample and then deliver it to the laboratory within one hour to obtain the most accurate results.