Late period

I am 5 days late on my period. How long should I wait before taking a pregnancy test ? Does time affect the results ?