You should generally wait at least 10 to 14 days after unprotected sex to take a pregnancy test for the most accurate results. This is because it takes time for fertilization to occur, then for the fertilized egg to implant in the uterus, and for the pregnancy hormone hCG to build up to detectable levels in your urine. Testing too early may result in a false negative since the hormone might not be high enough yet. Most reliable testing is around the time of your missed period, which usually happens about 2 to 3 weeks after sex. If you have irregular periods or don't know when your next period is due, waiting at least 14 days is advised. Early detection tests can sometimes be used a few days before a missed period, but their accuracy improves the closer you get to the expected period date.