Any time you have unprotected sex or intercourse without some form of birth control you are taking a risk of getting pregnant. You may not know right off that your body is now growing a small child inside, as there is no sign that the egg has been fertilized. But about four days after this happens, the body will start making a special hormone that is only made during pregnancy. This hormone (Human Chorionic Gonadotropin or HCG) is what a pregnancy test detects. When it is present the test will confirm the pregnancy with a positive result. So how long after having unprotected sex can you take a pregnancy test?
It is not wise to take a home pregnancy test right after you have unprotected sex as the body is not making enough of the hormone to be detected. It will start making it four days after the egg has been fertilized. But this informal analysis will only be able to detect the hormone about a week after the fertilization process. Once you have missed your period wait about one week before taking the home test. This amount of time will make it more likely that you will get accurate results.