It sounds like you’ve had two different kinds of HIV tests. The first kind, the one used by most clinics as a screening test, looks for antibodies produced by the immune system against the virus. Detectable antibody levels to HIV usually develop within two to eight weeks (the average is actually about four weeks), but it sometimes takes longer. This test will almost always be reliable three months after exposure, so to be on the safe side, we recommend a second HIV antibody test if the first was done before 90 days after exposure.
The second test you mentioned is the HIV 1 RNA PCR. This is an additional test sometimes performed for people with a high-risk exposure and symptoms of acute HIV disease. An exposure would be considered high-risk, for example, if the partner was known to be HIV positive. If this test was negative at 40 days after exposure, you did not become infected from the exposure you mentioned.
Having said that, I suggest considering how you will plan for HIV testing in the future. Depending on your circumstances, perhaps routine testing every 3-6 months would appropriate. This is because it is sometimes very difficult to determine how risky a given exposure might be. This would also be a good time to request screening for other sexually transmitted infections, and to review recommendations for immunizations (for example, for hepatitis B and HPV) with your doctor.
–J. Dennis Fortenberry, MD, MS