Approximately 25 million deaths worldwide have been attributed to infection with human immunodeficiency virus (HIV) since the beginning of the HIV epidemic in the early 1980s.  Data indicate that 40% of infected individuals are unaware of their diagnosis.  In the United States, by the end of 2014, the CDC estimated 1,200,000 persons aged 13 years or older were living with HIV infection. Of those, approximately 13% were unaware of their diagnosis. Of those, the CDC estimated that more than 44,000 people were diagnosed with HIV in 2014 with a 14% decline in new diagnoses from 2005 to 2014. 
Early diagnosis of HIV infection is of paramount importance, allowing health care providers an invaluable opportunity to prevent further transmission of the disease and to begin therapy, if warranted. Studies have also shown that infected persons who are aware of their positive HIV status decrease behaviors associated with transmission of the disease. [3, 4] Furthermore, studies have also shown treatment of HIV infection can significantly lower the risk of transmission to sexual partners. The identification of persons living with HIV and their subsequent treatments is a cornerstone of the US strategy to prevent HIV infections; this strategy begins with testing.  The diagnosis of HIV infection, as with any other diseases, should include a complete history and a detailed physical examination in order to reach an accurate interpretation of the information provided by laboratory data.
This article provides an overview of the available testing for the diagnosis of HIV infection. In order to adequately comprehend the scope of laboratory methods, a basic understanding of the structure of the HIV virion and its genome is necessary.
Also note the figures below.
HIV Virion and Genome
Human immunodeficiency virus (HIV)–1 is a member of the Retroviridae family. It is an enveloped virus with two copies of single-stranded RNA, which have capacity to recombine. The genome contains 3 major genes that encode structural proteins: gag, pol, and env. [6, 7] The gag gene encodes for p24, p17, and p7, among others. The env gene encodes for glycoprotein (gp) 120 and gp 41. The pol gene encodes the enzymes reverse transcriptase, integrase, and protease. HIV-1 also has regulatory genes (tat and rev) and genes that encode for accessory proteins (vpu, vpr, vif, and nef) that are important in viral replication and interaction with the host. HIV-2 shares the same genes with HIV-1 with the exception of vpu.
HIV-1 is divided into several groups  based on phylogenetic analysis: M (main), O (outlier), N (not M and not O), and the most recently identified P group,  named according to nomenclature guidelines.  Group M comprises several clades: A to D, F to H, J, K, and several circulating recombinant forms (CRFs). Subtype B is the most common clade in the United States. Although there is a difference in transmission rates, disease progression, response to antiretroviral therapy, and emergence of resistance to therapy among HIV groups and clades, [11, 12, 13] the most recent enzyme immunoassays are able to detect non-B subtypes. 
HIV infection can be diagnosed based on detection of antibodies that are directed against the proteins encoded by the 3 major genes, the detection of the p24 antigen, the viral nucleic acid, and, finally, by means of culturing the virus. However, in clinical practice, the most common method for diagnosing established HIV infection is by performing a screening test (eg, enzyme-linked immunosorbent assay [ELISA]) and by confirming a positive result with a supplementary test. The result of the confirmatory test is reported as positive, negative, or indeterminate.
HIV Testing Recommendations
In 2006, the Centers for Disease Control (CDC) published revised recommendations for HIV testing in adults, adolescents, and pregnant women in health care settings. [15, 16] The process of HIV testing should be voluntary, informed, and free from coercion, with the right to “opt out.” Importantly, a written separate consent is not required.
The CDC recommends routine HIV testing in the following populations:
All persons aged 13-64 years in all health care setting; risk assessment is not required to perform the test, and the test should be performed on a routine basis unless the prevalence of undiagnosed HIV infection in the population being tested is less than 0.1%
Routine screening should also be performed in all persons seeking treatment for a sexually transmitted disease (STD) on each visit, regardless of whether the person is known or suspected to have a risk behavior for HIV infection
Screening should be performed in all persons initiating treatment for tuberculosis
Persons with signs and symptoms or illnesses consistent with HIV infection should also be tested
Repeat HIV testing should be performed at least once a year in individuals considered at high risk for HIV infection, as follows:
Injection-drug users and their sex partners
Persons who exchange sex for money or drugs
Partner of an HIV-infected person
Person or partner who has had more than one sexual partner since their last HIV test; persons starting a new sexual relationship are also encouraged to be tested, regardless of a previous negative test result
Nationwide, 46% of high school students had had sexual intercourse and 13.8% of students had had sexual intercourse with four or more persons during their life. Despite the recommendation detailed above, only 13% of sexually active adolescents have ever been tested for HIV infection. 
In an attempt to increase the number of adolescents tested, the American Academy of Pediatrics  recently released the following recommendations for HIV testing in this population:
Routine HIV screening should be offered to all adolescents at least once by age 16-18 years in health care settings when the prevalence of HIV infection in the patient population is more than 0.1%; if the prevalence is less than 0.1%, adolescents who are sexually active and have other risk factors (eg, substance abuse) should undergo routine testing
High-risk youth should be tested annually for HIV infection; adolescents tested for other STDs should be tested for HIV infection at the same visit.
The available screening assays rely on the detection of antibodies, the p24 antigen, or the viral nucleic acid. Human immunodeficiency virus (HIV) antibodies can be detected with ELISA or enzyme immunoassay (EIA), particle agglutination, and chemiluminescent immunoassay (CIA). The source for antibody testing for EIA can be the whole blood, serum, plasma, saliva, or urine.
Currently, a fourth-generation EIA assay that detects both antibodies and the p24 antigen (HIV 1/2 antigen/antibody combination immunoassay) is available and the recommended screening platform for HIV testing. [19, 16]
EIA is the assay most widely used for the initial evaluation of established HIV-1 or HIV-2 infection. In an attempt to improve both sensitivity and specificity, 4 generations of EIAs have been produced since their introduction two decades ago.
The first-generation EIA relies on the detection of antibodies directed against a coated well with whole-cell lysate of infected cells. The second-generation EIA substituted the whole-cell lysate for recombinant-produced HIV antigens. Third-generation EIAs differ from the two previous generations. In this case, antibodies are detected through the “antigen sandwich” technique, in which the enzyme is linked to the antigen rather than to the antibody. This technique detects both immunoglobulin G (IgG) and immunoglobulin M (IgM), therefore allowing earlier antibody identification.
In the fourth-generation EIA, the wells are coated with both p24 antibodies and HIV-1 antigens. Host-derived p24 antigens or antibodies directed at these molecules are detected using an enzyme-labeled antibody.
Antibody response to HIV is detected at approximately 3-6 weeks after infection, depending on the generation of the EIA being used.  The detection of the p24 antigen by the fourth-generation assays shortens the window by 4.4-4.8 days compared to third-generation assays.  Individuals who test negative on the initial evaluation should undergo repeat antibody testing in 3 months in case they had not seroconverted at the initial evaluation.
According to the Association of Public Health Laboratories and the CDC  , a positive HIV-1 antigen/antibody and a second HIV-1/HIV-2 antibody-based differentiation test should be performed. A positive test confirms established HIV infection (i.e. the recommendations for Western blot have been removed). If the confirmatory HIV antibody testing is negative, the original combination test may have detected p24 anigen and not antibody. In this case, a nucleic acid amplification test (NAT) is performed. If the NAT result is positive, acute HIV infection is present. If negative, HIV -1 infection is ruled out. Note there are no NAT tests available for HIV-2 at this time.
Several conditions can cause false-positive EIA results, as follows:
Causes of false-negative EIA results include the following:
Testing during the window period 
HIV-2 if tests to detect HIV-1 only are used
Rapid HIV Testing
Rapid human immunodeficiency virus (HIV) testing is intended for use when immediate information is required for the initiation of prophylaxis, as in occupational or nonoccupational exposure and in pregnant women in labor who have not undergone prior HIV testing. Rapid HIV testing is also useful when the patient is unlikely to return for a follow-up visit.
The rapid tests are based on the detection of antibodies in whole blood, plasma, serum, or oral fluid. Six rapid tests are currently FDA approved [33, 34, 35] ; some of them detect both HIV-1 and HIV-2. The Clinical Laboratory Improvement Amendments (CLIA) regulates their performance. The tests are categorized as either CLIA “waived” or “moderate complexity.” The “waived” tests can be performed in settings such as emergency departments, mobile vans, and physician’s offices, as there are no federal restrictions/regulations. On the other hand, the “moderate complexity” tests must comply with all regulations and restrictions imposed by the CLIA.
The result of the test can be negative, which should be interpreted as a definite negative unless the testing occurred within the window period. A positive test result is considered preliminary and should be confirmed with Western blot or IFA. In resource-limited countries, an initial positive test result can be followed by another rapid test from another manufacturer. There are several algorithms available if rapid tests are used in this situation. 
For more information, see Rapid HIV Tests.
Home HIV-1 Testing
The FDA has licensed a home-collection kit for the diagnosis of human immunodeficiency virus (HIV)–1. The test uses a double EIA, and positive results are confirmed with an IFA. The individual collects his or her own blood specimen, mails it to a predetermined address using a confidential code, and receives the results in 1-5 days. The results are confidential, and a counselor is available by phone.
For more information, see Home HIV Testing.
Oral Fluid and Urine HIV Testing
An FDA-approved EIA known as OraQuick Advanced is available for the testing of human immunodeficiency virus (HIV)–1 and HIV-2 in oral fluid and blood.
The main concern with the oral fluid test has been clusters of high rates of false-positive results in several US cities, mainly New York City and San Francisco. [37, 38, 39] When whole-blood specimens were used for testing, there was no observed increase in false-positive rates. The CDC and the Food and Drug Administration (FDA) are aware of these reports and have recommended continued use of rapid HIV testing on oral fluid as long as test subjects are informed of the need for additional testing in case of a positive result.
The urine test Calypte HIV-1 is an EIA test that requires administration by a physician. Positive results should be followed by confirmation with a serologic test.
Human immunodeficiency virus (HIV) infection is typically confirmed with Western blot. The assay involves separation of the viral proteins by molecular weight on a polyacrylamide gel. The viral proteins are then electrotransferred from the gel to a solid support. The media is incubated with the patient’s serum, and the pattern of reactivity is read. The Western blot result can be positive, negative, or indeterminate.
According to the CDC and the Association of State and Territorial Public Health Laboratory Directors  a Western blot result is considered positive when two of the following bands are present: gp 120/160, gp 41, or p24. A negative Western blot result is defined as the absence of all bands. The result is considered indeterminate when one or more bands are present but do not meet the criteria for a positive Western blot result.
A positive HIV-1 Western blot result following a positive EIA result for HIV-1 or HIV-2 is diagnostic of established HIV-1 infection. A negative HIV-1 Western blot result following a positive EIA result for HIV-1 or HIV-2 is considered a true negative unless acute HIV-1 infection or infection with HIV-2 is suspected.
An indeterminate Western blot result can result from true infection (eg, HIV-1 infection that has not completely seroconverted, advanced AIDS, HIV-2 infection) or no infection  (eg, participant in a HIV-1 vaccine trial, pregnancy, elevated bilirubin levels, hemodialysis, malignancy, autoimmune diseases). An indeterminate Western blot result should prompt repeat testing with Western blot in 2-4 weeks unless acute HIV-1 or HIV-2 infection is suspected.  Non-B subtypes are detected by current HIV-1 Western blots, with sensitivity and specificity equal to those for subtype B.
Other available confirmatory tests include the indirect IFA and radioimmunoprecipitation assay; however, they are infrequently used in clinical practice.
HIV-1 Nucleic Acid Amplification Techniques (NAATs)
The detection of the proviral DNA is rarely used in clinical practice, the exception being diagnosis of human immunodeficiency virus (HIV)–1 infection in infants. The technique is based on amplification of the proviral DNA from infected peripheral blood mononuclear cells (PBMC) and detection by DNA probe. The test is very sensitive, capable of detecting 1-10 copies/mL of HIV proviral DNAs. This assay is not FDA approved for the diagnosis of HIV-1 infection.
The viral RNA can be detected by target (nucleic acid sequence-based amplification and reverse-transcriptase polymerase chain reaction [PCR]) and signal amplification (branched-chain DNA).  These assays are used for screening of blood products, therapeutic monitoring, and diagnosis of acute HIV-1 infection. The Aptima HIV-1 RNA Qualitative Assay  is the only FDA-approved test for detecting acute HIV infection.
For more information, see PCR HIV Test.
This technique is based on the isolation of the virus by cultivation of PBMC in an individual with human immunodeficiency virus (HIV)–1 infection with phytohemagglutinin-stimulated donor PBMCs with interleukin-2.
The main use of viral culture is for diagnosis of HIV-1 infection in infants, but, given its disadvantages (the test is expensive, is labor intensive, has a biohazard potential, and requires 2-3 weeks before a result can be obtained), it has been supplanted by NAATs. [43, 44]
Human immunodeficiency virus–2 diagnosis
Illness characteristic of HIV infection despite negative HIV-1 test result
West African origin
Sex partners or needle-sharing partners of a person known to be infected with HIV-2 or who is not infected but is from an HIV-2–endemic area
Children born to women with HIV-2 or who have risk factors for HIV-2 infection
Persons who have participated in a HIV-vaccine trial or have receive blood products or a nonsterile injection in HIV-2–endemic areas
People with unusual HIV-1 Western blot indeterminate patterns ( Gag plus Pol reactive bands without Env reactive bands)
Acute HIV infection
Early diagnosis of human immunodeficiency virus (HIV)–1 infection requires both sensitive and specific tests. Performance of available tests depends on the stage of the disease. The window period is defined as the time between the acquisition of infection and the development of detectable antibodies with the currently available assays.
Fiebig et al described 6 stages of the disease. [20, 47] After exposure, the virus remains in the exposed tissue without associated viremia, a period known as the eclipse phase, which lasts an average of 7 days. Currently, no routine detection method available for clinical use detects infection at this stage. The eclipse period is followed by the development of viremia, which can be detected with the available nucleic acid identification techniques. Identification of the viral nucleic acid is followed by detection of the p24 antigen and, lastly, antibodies.
Acute HIV-1 infection should be suspected in any patient with a negative or indeterminate HIV-1 serologic test result and a positive result on a nucleic acid amplification test or p24 antigen in the appropriate setting. The FDA  has approved a qualitative transcription-mediated amplification/hybridization protection assay (TMA/HPA)  for the screening or confirmation of HIV-1 infection, but not for both in the same individual. A 2009 report published by the APHL  states that a positive screening TMA/HPA result should be repeated for confirmation if an antibody response is not detectable and that the patient will need follow-up to document seroconversion.
Pregnancy and labor
The CDC recommends human immunodeficiency virus (HIV) testing as early as possible in every pregnancy.  The test should be voluntary, with the option to opt-out. If the patient declines testing, every effort should be made to address the reasons for that decision. A second HIV test during the third trimester, preferably before 36 weeks’ gestation, is cost-effective even in areas of low HIV prevalence and may be considered in all pregnant women. A second HIV test is recommended in pregnant women with high risk behavior for HIV infection (eg, injection-drug use), when the prevalence of HIV infection in that population is greater than 0.1%, or when the incidence of HIV infection in that health care facility is at least one per 1000 women screened.
All women in labor whose HIV status is unknown should undergo rapid HIV testing. If the test result is positive, available interventions to decrease the risk of perinatal transmission (eg, administration of antiretroviral therapy) should be initiated without waiting for a confirmatory test.
The diagnosis of human immunodeficiency virus (HIV) infection in the newborn is complicated by the fact that antibodies from the HIV-infected mother can be passively transferred to the newborn and can be detectable for up to 18 months.  A positive serologic test result in the newborn is informative when the mother’s HIV status is unknown. In this case, the newborn should be started on antiretroviral therapy within the first 12 hours of life. A negative test result is informative, as it indicates the absence of HIV infection unless the mother is in the window period.
The criterion standard for the diagnosis of HIV-1 infection in infants and children younger than 18 months relies on detection of the viral nucleic acid. A diagnosis of HIV-1 infection can be established or excluded using this technique within the first several weeks of life in the nonbreastfed infant. Guidelines for the diagnostic evaluation of HIV-1 infection in the newborn can be found elsewhere. [43, 48]
HIV testing in correctional facilities
In the United States, the CDC recommends “opt-out” testing for inmates in correctional facilities. 
Several opt-out approaches can be used for screening, discussed below.
High-risk behaviors include injection drug use; men who have sex with men (MSM); sex with an injection drug user, MSM, or HIV-infected partner, multiple sexual partners, exchange of sex for money or drugs, and diagnosis of another STD.
This includes the following:
History of tuberculosis infections
Presence of needle tracks
History of an STD
Signs or symptoms consistent with HIV
This includes the following:
Residence in low-income or known high-prevalence area
Age 25-44 years
CDC also recommends that individuals at high risk of HIV infection be screened annually.
HIV-1 vaccine participants
The diagnosis of human immunodeficiency virus (HIV)–1 infection in vaccine recipients is difficult, as vaccination induces antibodies that might result in a positive result on a screening or confirmatory test.  To date, no serological tests distinguish virus from vaccine-derived antibodies. The diagnosis can be based on interpretation of the Western blot pattern or detection of the proviral DNA or RNA.  Most recently, a serologic assay (HIV-SELECTEST) directed at conserved sequences of the gp 41 and p6 not present in most current HIV vaccines demonstrated over a 99% sensitivity and specificity for the diagnosis of HIV-1 infection. 
The diagnosis of HIV-1 infection in these cases should be made in conjunction with the vaccine research group.