The answer depends on what you’re worried about. After unprotected sex, several different clocks start ticking at once, each with its own timeline. Emergency contraception works best within the first 24 hours. A pregnancy test is most reliable after 21 days. STI tests need anywhere from one week to three months depending on the infection. Here’s a breakdown of every major timeline you might need.
How Long After Sex to Take Emergency Contraception
Emergency contraception is most effective the sooner you take it. There are two main types of morning-after pill, and they have different windows.
The more widely available option (sold over the counter at most pharmacies) should be taken within 72 hours (three days). It’s about 94% effective if taken in the first 24 hours, but that drops to roughly 58% by the 72-hour mark. The prescription-only option works for up to 120 hours (five days) after sex. It stays more effective across that window: around 98% in the first 24 hours and still about 85% at the five-day mark. A copper IUD can also be inserted as emergency contraception within five days and is the most effective option of all.
The key takeaway: don’t wait. Every hour matters, especially with the over-the-counter pill.
How Long After Sex Can You Get Pregnant
Pregnancy doesn’t happen the moment you have sex. Sperm can survive inside the reproductive tract for three to five days, waiting for an egg to be released. That means sex that happens several days before ovulation can still lead to pregnancy.
The highest chance of conception occurs when intercourse happens about two days before ovulation, with a probability of around 26%. By one day after ovulation, the chance drops to just 1%. Once an egg is fertilized, it takes about six more days to implant in the uterine wall. Only after implantation does the body begin producing the hormone that pregnancy tests detect.
How Long After Sex to Take a Pregnancy Test
A pregnancy test won’t give you a reliable result right away because your body needs time to produce detectable levels of the pregnancy hormone. From the day of sex, you’re looking at roughly two to three weeks before a test can pick it up: a few days for possible fertilization, about six days for implantation, and then several more days for hormone levels to rise enough to register on a test.
The NHS recommends testing from the first day of your missed period for the most reliable result. If your cycle is irregular or you’re not sure when your period is due, wait at least 21 days after the last time you had unprotected sex. Some sensitive tests claim to work a few days before a missed period, but testing too early increases the chance of a false negative.
How Long After Sex to Get Tested for STIs
Every sexually transmitted infection has its own incubation period, which is the gap between exposure and when a test can actually detect it. Testing too early can give you a false negative, making you think you’re in the clear when you’re not.
- Chlamydia and gonorrhea: A test at one week will catch most infections. Waiting two weeks catches nearly all of them.
- Syphilis: Blood tests pick up most cases at one month, but it can take up to three months to catch almost all infections.
- HIV (blood test): A newer blood test that checks for both antigens and antibodies detects most cases at two weeks, with six weeks catching almost all. An oral swab test takes longer: one month catches most, and three months catches almost all.
If you’re concerned about a specific exposure, getting tested at the earliest useful window and then retesting at the outer window gives you the most confidence in your results.
How Long After Sex to Start HIV Prevention (PEP)
If you think you may have been exposed to HIV, post-exposure prophylaxis (PEP) is a course of medication that can prevent infection, but it must be started within 72 hours of exposure. After that window, PEP is unlikely to work and is no longer recommended. This is a strict deadline. If there’s any chance of HIV exposure, seek care as quickly as possible. PEP involves taking medication daily for 28 days.
How Soon After Sex to Pee (UTI Prevention)
Urinating after sex helps flush bacteria away from the urethra and reduces the risk of a urinary tract infection. There’s no strict medical deadline here, but sooner is better. Aim to use the bathroom shortly after you’re done rather than falling asleep first. This is especially relevant if you’re prone to UTIs, since sex is one of the most common triggers. Drinking a glass of water afterward can help if you don’t feel the urge to go right away.
Quick Reference by Timeline
- Immediately after: Urinate to help prevent UTIs.
- Within 24 hours: Emergency contraception is at peak effectiveness.
- Within 72 hours: Last window for PEP (HIV prevention) and for the over-the-counter morning-after pill.
- Within 120 hours (5 days): Last window for the prescription morning-after pill or copper IUD.
- 1 to 2 weeks: Earliest reliable testing for chlamydia, gonorrhea, and HIV (blood test).
- 21 days (3 weeks): Earliest reliable home pregnancy test if you don’t know your cycle.
- 1 to 3 months: Full testing window for syphilis and HIV (oral swab).

