Medically reviewed by Drugs.com. Last updated on Dec 31, 2021.
Human immunodeficiency virus (HIV) testing determines whether you're infected with HIV, a virus that weakens your immune system and can lead to acquired immunodeficiency syndrome (AIDS).
Some HIV tests check for antibodies that your immune system produces in reaction to HIV infection. Other HIV tests look for evidence of the virus itself. Rapid tests can produce results within 20 minutes.
Researchers continue to improve the sensitivity of tests (how well they detect HIV infection) and how long the tests take to provide results. Guidelines for testing change as tests improve.
Why it's done
HIV testing is essential for slowing the spread of HIV infection. Many people are unaware that they're infected with HIV, so they may be less likely to take precautions to help prevent spreading the virus to others.
Also, early diagnosis often results in earlier treatment with drugs that may delay the progression to AIDS.
The Centers for Disease Control and Prevention (CDC) recommends that everyone ages 13 to 64 years be tested for HIV. This can be done during visits with a health care provider or through community HIV testing centers.
HIV testing is particularly important for pregnant women because they can pass the virus to their babies during pregnancy or delivery or through breast-feeding. Taking medication that combats HIV during pregnancy and delivery greatly reduces the risk that you'll transmit the virus to your baby.
How often should you be tested?
The CDC recommends at least one HIV test for everyone ages 13 to 64 years. Yearly testing is recommended if you're at higher risk of infection. The CDC recommends that sexually active gay and bisexual men consider testing every three to six months.
Consider HIV testing yearly and before having sex with a new partner if you:
- Have had unprotected vaginal, oral or anal sex with more than one sexual partner or with an anonymous partner since your last screening
- Are a man who has sex with men
- Use intravenous (IV) drugs, including steroids, hormones or silicone
- Have been diagnosed with tuberculosis or a sexually transmitted infection (STI), such as hepatitis or syphilis
- Exchange sex for money or drugs
- Have had unprotected sex with someone who falls into any of the above categories
Also consider getting tested if you:
- Have been sexually assaulted
- Are pregnant or planning to get pregnant
How you prepare
No special preparations are necessary for HIV testing. Many different settings offer testing including:
- Health care providers' offices
- Community health centers
- Sexually transmitted disease treatment clinics
- Substance abuse treatment programs
If you don't have health insurance, some sites offer free testing.
To find a site near you, use the HIV.gov HIV services locator.
What you can expect
HIV is usually diagnosed by testing your blood or a sample of cells taken with a swab from inside your cheek for the presence of antibodies to the virus.
HIV tests vary in how soon they are able to detect infection. The time between when you get the virus and when it can be detected is called the window period. It can take up to three to 12 weeks for your body to make enough antibodies for an antibody test to detect HIV infection.
It usually takes a few days to a few weeks to get results of an HIV test, although rapid HIV tests can produce results in about 20 minutes.
Regardless of the type of screening test used, if you have an initial positive result you'll need follow-up testing to establish an HIV diagnosis.
Rapid HIV testing
Several rapid tests offer highly accurate information within as little as 20 minutes. These tests look for antibodies to HIV using either:
- A sample of your blood, drawn from a vein or a finger prick
- Fluids collected on a treated pad that is rubbed on your upper and lower gums
A positive reaction on a rapid test requires an additional blood test to confirm the results.
Home HIV testing
Home testing involves:
- Collecting an oral fluid sample by swabbing your mouth
- Using a kit to test the sample yourself
You'll get results in 20 minutes. A positive test result means you'll need a follow-up test. The maker of the test offers confidential counseling and referral to follow-up testing sites.
A home blood test is no longer available.
Clinic or lab HIV testing
Doctors' offices or other health care settings will likely follow the CDC recommendations for testing:
- If this is your initial test, you will be given a combination HIV antigen/antibody test.
- If this test is positive, you will then be tested with a second HIV antibody test. This test can tell the difference between the two most common types of HIV, HIV-1 and HIV-2.
- If these two test results conflict, a third test called an HIV-1 RNA test (nucleic acid amplification test) will look directly for HIV in your blood.
No test can confirm HIV infection immediately after you're exposed. Tests that provide the earliest results are those that:
- Look for antigens — proteins that develop within the first few weeks after infection
- Evaluate your blood for genetic material from the virus
Tests that detect antibodies take longer. To get accurate results, you'll need to have been infected for at least three weeks.
False-positive and false-negative test results can occur. Doctors will use a variety of tests in sequence (an algorithm) until they determine for certain that you are either HIV-negative or HIV-positive.
Negative HIV test results
A negative test result from HIV testing may mean one of two things: You don't have HIV, or it's too soon yet to tell.
If you were only recently exposed to HIV, you could test negative for HIV antibodies because your body hasn't had time to create them yet. You'll need to be retested for HIV antibodies in three months, and until then, practice safe sex.
Positive HIV test results
If you test positive for HIV on both the initial and follow-up testing, it confirms that you are HIV-positive.
Although there's no cure for HIV/AIDS, treatment has come a long way in the past few decades, offering extended and improved quality of life for many. If you are infected with HIV and receive up-to-date treatment, you can have a near-normal life expectancy. Early treatment can help you stay well and prevent or delay the onset of AIDS. Tell your partners if you test positive for HIV because they will need to be evaluated and possibly treated, as well.