General information only. It does not replace advice from a health professional. Do not self-medicate with antibiotics. For fever with a rash, a stiff neck, confusion or difficulty breathing, call emergency services.

Why testing matters so much
Modern antiretroviral treatment allows people with HIV to have a life expectancy similar to that of the general population and not to transmit the virus. But it only works if the infection is diagnosed. According to the UNAIDS 2025 Global AIDS Update, at the end of 2024 40.8 million people were living with HIV and there were 1.3 million new infections.
In Spain, the national HIV surveillance system (SINIVIH, Ministry of Health and ISCIII) reports between 3,000 and 3,500 new diagnoses a year in its latest reports, and about half are late diagnoses (fewer than 350 CD4 cells/µL at diagnosis). In the 2023 report, late diagnosis reached 61.5% in people over 50. In the UK, UKHSA also reports that a substantial proportion of diagnoses are made late, especially among heterosexual adults. Late diagnosis worsens the outlook and allows the virus to keep being passed on unknowingly.
Who should be tested
- Everyone, at least once in their life, especially between the ages of 20 and 59: testing is voluntary, confidential and free in public health services.
- Anyone who has had a risk exposure (sex without a condom with partners of unknown status, sharing injecting equipment) or a partner with HIV who is not on effective treatment.
- People with another sexually transmitted infection, hepatitis B or C, tuberculosis or an indicator condition (pneumonia, shingles in young people, lymphoma, oral thrush, unexplained weight loss or fever, low platelets or lymphocytes…).
- All pregnant women in the first trimester (and again in the third if at risk).
- People on PrEP: every 3 months.
- Men who have sex with men, trans people, sex workers and people who use drugs: regularly (every 3-12 months depending on risk).
Act immediately: if you have had a risk exposure in the past 72 hours (sex without a condom with someone who may have HIV, a needlestick injury with a used needle, sexual assault), go to an emergency department or sexual health clinic as soon as possible: post-exposure prophylaxis (PEP) greatly reduces the risk of infection, but only works if started early, ideally within hours. See post-exposure prophylaxis.
Diagnostic tests and the window period
The window period is the time between infection and the point at which a test can detect it. It depends on what each test looks for:
| Test | What it detects | Sample | Positive in most people from | Rules out infection if negative at… |
|---|---|---|---|---|
| Viral load (HIV RNA, PCR) | Viral genetic material | Blood | 10-15 days | Not used alone for screening (risk of false positives at low levels) |
| Laboratory fourth-generation test (p24 antigen + antibodies) | p24 and IgM and IgG antibodies | Venous blood | 2-4 weeks | 6 weeks |
| Rapid fourth-generation test | p24 + antibodies | Finger-prick blood | Slightly later than the laboratory test | 6-12 weeks depending on the manufacturer |
| Rapid antibody test (third generation) | Antibodies | Finger-prick blood or saliva | 3-6 weeks | 12 weeks |
| Self-test | Antibodies | Finger-prick blood | 3-6 weeks | 3 months |
The "rule-out" times are those commonly used in European and British guidance (BHIVA/BASHH); if PEP or PrEP has been taken, the period can be longer and the team will advise when to repeat the test.
How a reactive result is confirmed
A "reactive" screening result is not yet a diagnosis. The laboratory follows an algorithm:
- It repeats the screening test.
- It performs a different confirmatory test: an immunoassay that distinguishes antibodies to HIV-1 and HIV-2 (immunoblot or differentiation assays), and/or
- It measures the viral load. If antibodies are not yet conclusive but RNA is positive, this is acute infection, the most infectious phase.
- A second sample is requested to confirm identity and rule out errors.
In babies born to mothers with HIV, antibody tests are not useful (the mother's antibodies pass to the child and persist for up to 18 months): HIV RNA or DNA tests are done on several occasions during the first months.
Self-testing
In Spain, HIV self-tests have been sold in pharmacies without prescription since 2018; in the UK they are widely available, including free through the NHS and sexual health services. They use a drop of blood from the finger and give a result in about 15 minutes. A negative result is only reliable if 3 months have passed since the last risk exposure. A positive result must always be confirmed at a health service or a community organisation with a linkage-to-care pathway, and is not a reason to panic: effective treatment exists.
Viral load
Viral load measures how many copies of HIV RNA there are in a millilitre of plasma, using quantitative PCR. It is the key test for knowing whether antiretroviral therapy is working.
| Viral load (copies/mL) | How it is interpreted |
|---|---|
| Not detected or below 20-50 | Treatment goal: viral suppression |
| Sustained below 200 | No sexual transmission of HIV (undetectable = untransmittable, U = U) |
| 50-200 in a single test ("blip") | An isolated rise, common and of no consequence if the next result is undetectable again |
| Above 200 in two consecutive tests | Virological failure according to most guidelines: review adherence and interactions and perform resistance testing |
| Above 100,000 before treatment | High viral load: affects the choice of some drugs and the urgency |
Results are also expressed in logarithms: 100,000 copies/mL is 5 log. Changes of less than 0.5 log (about threefold) are within the variability of the assay.
When it is measured (indicative, according to GeSIDA, EACS and BHIVA guidance): at diagnosis; 4-6 weeks after starting or changing treatment; then every 3 months until undetectable; and, once stable, every 6 months (some guidelines allow 12 months in people who have been stable for years).
The international U = U campaign is based on large studies (HPTN 052, PARTNER and PARTNER2, Opposites Attract) in which there were no sexual transmissions to partners when the person with HIV had a suppressed viral load. More in what does undetectable = untransmittable mean?.
CD4 lymphocytes
CD4 T lymphocytes ("helper" cells) are the cells HIV infects and destroys. Counting them shows the state of the immune system and the risk of opportunistic infections. They are measured by flow cytometry on EDTA blood, as an absolute number (cells/µL or cells/mm³) and as a percentage of all lymphocytes.
| CD4 (cells/µL) | Interpretation | What it means |
|---|---|---|
| 500-1,500 | Usual range in adults without HIV | Immune function preserved |
| 350-499 | Moderate fall | Somewhat impaired immunity |
| Below 350 | Late diagnosis if at diagnosis | Increased risk of infections |
| Below 200 (or below 14%) | Advanced HIV disease; high risk of Pneumocystis | Co-trimoxazole prophylaxis |
| Below 100 | Severe immunosuppression | Screening for cryptococcal antigen; toxoplasma prophylaxis if IgG is positive |
| Below 50 | Very severe immunosuppression | Risk of cytomegalovirus retinitis and atypical mycobacteria; eye examination |
The CD4/CD8 ratio (normally above 1) is another marker: its recovery indicates better immune reconstitution. Prophylaxis is stopped when, on effective treatment, CD4 counts stay above the thresholds for a few months. More details in CD4 and viral load values, AIDS and advanced HIV disease and Pneumocystis jirovecii.
When they are measured: at diagnosis and 3-6 months after starting treatment; then every 6-12 months. Once someone has had an undetectable viral load for years and CD4 counts above 350-500, many guidelines allow testing to be spaced out or stopped, because it no longer adds information.
Other tests at diagnosis
Once infection is confirmed, the initial work-up includes, according to the GeSIDA, EACS (version 13.0, 2025) and BHIVA guidelines:
- Genotypic resistance testing (reverse transcriptase, protease and integrase) by sequencing.
- HLA-B*57:01 before using abacavir (risk of hypersensitivity reaction).
- Serology for hepatitis A, B and C, syphilis, toxoplasma, cytomegalovirus and varicella (see serology and hepatitis markers).
- Screening for tuberculosis infection (IGRA or TST).
- Screening for other STIs, cervical and anal cytology or HPV testing, general blood tests (kidney and liver function, lipids, glucose).
Treatment is recommended for all people with HIV, as soon as possible, ideally within days of diagnosis, without waiting for every result (except in some opportunistic infections such as cryptococcal or tuberculous meningitis). See the HIV guideline.
Example reports (teaching examples, invented data)
Example 1. Diagnosis. Man aged 29 with fever, rash and swollen glands two weeks after sex without a condom. Fourth-generation test: REACTIVE. HIV-1/HIV-2 confirmatory immunoassay: indeterminate. Viral load: 2,400,000 copies/mL. Interpretation: acute HIV-1 infection; very high viral load and maximum infectiousness. Rapid start of treatment and partner notification. See HIV infection.
Example 2. Follow-up. Woman aged 52 on treatment for 6 years. Viral load: 96 copies/mL. Previous (6 months ago): undetectable. Interpretation: possible blip; adherence is reviewed and the test repeated in 4-6 weeks. If it is undetectable again, nothing else needs to be done.
Example 3. Late diagnosis. Man aged 61 with pneumonia. CD4: 85 cells/µL (6%). Viral load: 310,000 copies/mL. Serum cryptococcal antigen: negative. Interpretation: advanced HIV disease; rule out Pneumocystis pneumonia, start co-trimoxazole prophylaxis and antiretroviral treatment as soon as possible.
Common errors and false results
- Testing too soon after exposure and assuming infection has been ruled out.
- False positives on screening (1 in several thousand with current tests; more common in pregnancy, after some vaccines or in autoimmune disease): this is why a diagnosis is never given without confirmation.
- False negatives: window period; people taking PrEP or PEP when they become infected (the antibody response is delayed); very rarely, elite controllers or HIV-2 infection with tests that detect it poorly.
- HIV-2 viral load: standard assays do not quantify it; specific methods in reference laboratories are needed.
- Interpreting a single CD4 count: it can fall with an intercurrent infection, surgery or corticosteroids, and varies with the time of day. The trend is what matters.
Limitations
- No test is perfect in the first weeks after exposure.
- An undetectable viral load does not mean cure: HIV remains in reservoirs and rises again if treatment is stopped.
- CD4 counts alone do not measure the quality of the whole immune response.
Frequently asked questions
Is an HIV test confidential? Yes. You can have one at your GP surgery or health centre, at sexual health clinics and through many community organisations, in some cases anonymously.
Will I be tested for HIV without being asked? No: testing is voluntary, although it is offered routinely in many situations (pregnancy, STIs, hospital admission; in parts of the UK, opt-out testing in emergency departments).
My partner has HIV with an undetectable viral load: do I need testing? There is no risk of sexual transmission with a suppressed viral load, but regular testing for HIV and other STIs is sensible as part of sexual health.
Could I have HIV with an undetectable viral load and not know? Without treatment, almost never: fewer than 1% of people with HIV control the virus on their own (elite controllers). Their antibodies are still detected.
Should I take antibiotics if my CD4 count is low? Only those your team prescribes as prophylaxis (co-trimoxazole and others). Never on your own initiative.
Sources
- European AIDS Clinical Society. EACS Guidelines, version 13.0. Brussels: EACS; 2025.
- GeSIDA / Division for the Control of HIV, STIs, Viral Hepatitis and Tuberculosis. Documento de consenso sobre el tratamiento antirretroviral en adultos con infección por el VIH (current edition). Madrid: SEIMC-GeSIDA and Spanish Ministry of Health.
- Spanish Ministry of Health, National Centre of Epidemiology (ISCIII). Vigilancia epidemiológica del VIH y sida en España 2024. HIV New Diagnoses Information System. Madrid; November 2025.
- UNAIDS. Global AIDS Update 2025. Geneva: UNAIDS; 2025.
- Panel on Antiretroviral Guidelines for Adults and Adolescents. Guidelines for the Use of Antiretroviral Agents in Adults and Adolescents with HIV. US Department of Health and Human Services; current update.
- Spanish Ministry of Health. Guía de recomendaciones para el diagnóstico precoz del VIH en el ámbito sanitario. Madrid: Ministry of Health; 2014.
- Rodger AJ, Cambiano V, Bruun T, et al. Risk of HIV transmission through condomless sex in serodifferent gay couples with the HIV-positive partner taking suppressive antiretroviral therapy (PARTNER): final results of a multicentre, prospective, observational study. Lancet. 2019;393(10189):2428-2438.
- Centers for Disease Control and Prevention. Laboratory Testing for the Diagnosis of HIV Infection: Updated Recommendations. 2014 (2018 technical update).
- Miller JM, Binnicker MJ, Campbell S, et al. Guide to Utilization of the Microbiology Laboratory for Diagnosis of Infectious Diseases: 2024 Update by IDSA and ASM. Clin Infect Dis. 2024. doi:10.1093/cid/ciae104. doi:10.1093/cid/ciae104