How long after sex an STD shows up depends on the pathogen, not the encounter. Gonorrhea and chlamydia can turn a test positive in 1 to 5 days. Herpes lesions usually appear 2 to 12 days after exposure. Syphilis takes about 3 weeks to produce a detectable sore, HIV needs 10 to 33 days for a lab antigen test to register, and HPV often never shows a visible sign at all. Testing too early returns a false negative.
The biology of the window period
An STD test does not detect the moment of transmission. It detects a signal the pathogen leaves behind: DNA, RNA, a surface protein, or antibodies your immune system built against it. The gap between exposure and a detectable signal is the window period. That gap varies because each organism replicates and spreads at a different speed.
Nucleic acid amplification tests, the standard for chlamydia and gonorrhea, copy and amplify tiny amounts of bacterial genetic material. They can flag an infection within days because the bacteria multiply fast in mucosal tissue. Antibody tests work the opposite way. They wait for your adaptive immune system to produce IgM and then IgG antibodies, a process that takes one to several weeks. This is why HIV antigen/antibody tests have a longer window than bacterial NAATs.
A positive result before the window closes is reliable. A negative result before the window closes means little. The test was not sensitive enough yet, not that you are clear. This distinction is the single most important idea in this entire article.
Quantified windows by pathogen
The table below gives typical detection windows from authoritative guidance. Treat the numbers as population averages, not personal guarantees. Individual immune responses and inoculum size shift the timing.
| Infection | Test type | Typical detection window |
|---|---|---|
| Chlamydia | NAAT (urine or swab) | 1 to 5 days |
| Gonorrhea | NAAT (urine or swab) | 1 to 5 days |
| Trichomoniasis | NAAT or wet mount | 5 to 28 days |
| Syphilis | Nontreponemal plus treponemal serology | About 3 weeks to first detectable; up to 90 days |
| Genital herpes | PCR from lesion; type-specific serology | 2 to 12 days for lesions; serology up to 12 to 16 weeks |
| HIV | 4th-generation antigen/antibody lab test | 10 to 33 days; most detect by 45 days |
| HPV | No routine screening test for men; Pap/HPV co-test for cervix | Months to years; often no visible sign |
The spread within a single row is real. Syphilis can produce a chancre around day 21, but serology may lag. Herpes can erupt in 48 hours or stay silent for months. The table gives you a planning range, not a verdict.
Why the same exposure produces different timelines
Three variables drive the timing. First is pathogen replication speed. Bacteria doubling every 20 to 30 minutes reach detectable loads faster than viruses that must enter host cells first. Second is route and dose. A larger inoculum through a mucosal surface establishes infection faster than a small one. Third is your immune response, which determines how quickly antibodies appear.
A counterintuitive detail worth internalizing: a longer window is not "safer." HPV has the least reliable visible timeline and the highest prevalence of any sexually transmitted infection. Something that never shows up can still be present and transmissible. Absence of symptoms is not absence of infection.
Plain language: fast-spreading bacteria show up in days, slow antibody responses take weeks, and some viruses never announce themselves.
Edge cases that break the averages
Several situations stretch the standard windows and deserve explicit mention.
Immunocompromised people may seroconvert later, so HIV and syphilis antibody windows can extend beyond typical ranges. People taking HIV pre-exposure prophylaxis may have delayed or blunted antibody responses, complicating early testing. Recent antibiotic use can suppress bacterial loads enough to cause a false negative NAAT. Herpes PCR from a healed lesion is far less sensitive than from an active one, so timing of the swab matters. HPV and Molluscum contagiosum can have incubation periods measured in months, not days. A partner with a known infection changes your pretest probability, so test even if you feel fine.
Red-flag warnings that should trigger immediate care regardless of timeline:
A new painful genital ulcer, especially with a firm, painless edge that could be a syphilis chancre. Sudden pelvic pain, fever, or abnormal discharge that could signal pelvic inflammatory disease. A rash on the palms and soles, which can mark secondary syphilis. Flu-like illness with fever and swollen glands 2 to 4 weeks after exposure, which can mark acute HIV. Any lesion, discharge, or pain that persists beyond a week.
Misconceptions that lead to missed infections
The most common error is testing the morning after sex and trusting a negative result. That negative falls inside nearly every window listed above. It tells you almost nothing. Repeat testing at the correct interval is what produces a meaningful answer.
A second misconception is that no symptoms means no infection. Chlamydia is asymptomatic in a large share of infected people, and gonorrhea frequently is too. Syphilis can hide for years in latent stages. You cannot screen by feel.
A third error is assuming one test covers everything. A standard urine NAAT checks chlamydia and gonorrhea. It does not check syphilis, HIV, herpes, or trichomoniasis. Those need separate blood tests or swabs. Build a panel, not a guess.
A professional caveat: screening recommendations are set by public health bodies and change over time. The CDC publishes current guidance on who should be screened and how often. When in doubt, follow the most recent CDC screening guidance for your risk group rather than a generic internet timeline (CDC, 2021 STI Treatment Guidelines).
Practical actions with concrete thresholds
Translate the windows into a testing plan. These steps assume no symptoms; if you have symptoms, see a clinician now rather than waiting for a window.
Test for chlamydia and gonorrhea with a NAAT at 5 days after exposure, or later. A negative at 2 days is not conclusive. Test for HIV with a 4th-generation lab antigen/antibody test at 18 to 45 days. A negative at 45 days is highly reliable for most people. Test for syphilis serology at 3 weeks, and repeat at 90 days if the first is negative and risk was high. Get a herpes PCR swab if any lesion appears, ideally within 48 hours of onset. Do not wait for it to heal. Ask about trichomoniasis NAAT if you have discharge or irritation, roughly 1 to 4 weeks after exposure. Use condoms or barriers during the window, since you can transmit an infection before it is detectable.
Cost matters for planning. Many public health clinics offer low-cost or free STI panels. At retail, a basic chlamydia and gonorrhea NAAT often runs about USD 30 to USD 100 out of pocket, and a broader panel covering HIV and syphilis costs more. Prices vary widely by region and provider, so confirm locally rather than budgeting from a single figure.
Reconciling thresholds: the 5-day rule for bacterial NAATs, the 18-to-45-day HIV window, and the 90-day syphilis repeat are not competing claims. They describe different tests for different organisms. Use each threshold for its matching test, and choose the latest relevant date when you want one comprehensive clearance test.
Limits of what testing can tell you
No test proves you are infection-free at a single point in time. A negative result only means no detectable signal as of that sample, given the window that had elapsed. If exposure timing is uncertain, the safe move is a repeat test after the longest relevant window, not reassurance from one early sample.
Some infections have no reliable routine test for all body sites. HPV has no approved screening test for men, and herpes serology can miss recent infection. For these, symptom awareness and partner communication carry more weight than a lab result. Finally, this article describes mechanisms and general windows, not a personal diagnosis or treatment plan. If a test is positive or symptoms appear, a clinician determines treatment. The numbers here help you time a test correctly so the result means something.