This question usually refers to how soon after exposure can someone test for HIV.
This usually requires waiting 3 to 4 weeks before taking an antibody-based test (see Figure 6).
UK guidelines state that 4th generation HIV tests (antigen/antibody) will detect 95% of infections four weeks after exposure.
A negative test after four weeks then needs to be confirmed with a second test three months after the risk. This is in case you take longer than four weeks to generate an antibody response.
In high risk exposures, especially if symptoms occur, viral load testing is sometimes used after one week.
This includes after a sexual assault or after a needlestick injury to a healthcare worker.
In these cases a viral load test can exclude an infection when there are symptoms.
Viral load tests are not approved to diagnose HIV. A negative result still needs to be confirmed by an antibody test three months after the risk.
Figure 6: Recommended time from exposure to HIV test
1 June 2016