Can I get some help please

Hi I was wondering if anyone can tell me how long I have to wait after sex to take a pregnancy test?