How effective is HPV vaccination at preventing anal cancer in people who have anal sex?

Checked on January 5, 2026
Disclaimer: Factually can make mistakes. Please verify important information or breaking news. Learn more.

Executive summary

HPV vaccination substantially reduces the risk steps that lead to anal cancer—preventing persistent infection with the high‑risk HPV types that cause most anal cancers and cutting rates of high‑grade anal intraepithelial neoplasia (HSIL), the principal precursor to anal squamous cell carcinoma (SCCA) [1] [2]. The protection is strongest when the vaccine is given before HPV exposure (typically before sexual debut), but observational and trial data show meaningful benefits for sexually active people who have anal sex—especially younger individuals and some high‑risk groups—while important gaps remain for older and immunocompromised populations [3] [1] [4].

1. How the vaccine blocks the causal chain from sex to cancer

Anal cancer is driven overwhelmingly by persistent infection with high‑risk HPV types (principally HPV‑16 and 18), and the licensed vaccines generate immunity to those types, reducing persistent anal infection and therefore the substrate for progression to HSIL and invasive cancer [1] [5]. Clinical trials demonstrated large reductions in persistent anal infection and in vaccine‑type HSIL: the quadrivalent vaccine cut persistent infection risks for vaccine types by roughly 59–95% in trial analyses and reduced HSIL incidence in men who have sex with men (MSM) [1]. The 9‑valent vaccine covers additional oncogenic types found in anal cancers, theoretically expanding preventable disease [3] [6].

2. Evidence from randomized trials and real‑world studies

A randomized substudy in MSM aged 16–26 found vaccine efficacy against anal intraepithelial neoplasia associated with vaccine HPV types of 50.3% in intention‑to‑treat and 77.5% in per‑protocol analyses, and large reductions in persistent infection with vaccine types [1]. Real‑world registry studies have since linked childhood/adolescent vaccination to substantially lower risks of anal HSIL or worse in population cohorts, with the strongest effect when vaccination occurred at younger ages (e.g., Denmark nationwide data showing marked risk reductions when vaccinated before age 17) [2] [7]. Ecologic analyses in the U.S. also report falling anal cancer rates in younger adults following vaccine rollout, consistent with vaccine impact though limited by observational design [8].

3. Who benefits most — timing, sexual behavior, and immune status

Maximal prevention occurs when vaccination precedes sexual debut because it prevents initial infection; models and reviews conclude early vaccination could prevent the vast majority of HPV‑related anal cancers if coverage were high before exposure [3] [9]. Vaccination still helps sexually active people by preventing new infections and reducing recurrence of HSIL after treatment, with particular value for MSM and people living with HIV who face much higher anal cancer risks—although vaccine effectiveness is lower when prior exposure to HPV is common and the evidence in HIV‑positive individuals is partly observational and still evolving [4] [10] [11].

4. Limits, uncertainties, and policy tradeoffs

No large randomized trial has yet shown direct prevention of invasive anal cancer because the cancer is relatively rare and has a long latency; most high‑quality evidence uses persistent infection and HSIL as validated surrogates, and real‑world registry studies provide promising signals for reduced precancers and early reductions in cancer incidence among vaccinated cohorts [1] [2] [7]. Cost‑effectiveness and public‑health prioritization remain contested in some analyses—universal male vaccination and targeted programs for MSM are both advocated but debated depending on incidence, existing vaccine coverage, and equity considerations [11] [9]. Vaccine uptake gaps by gender, race/ethnicity, and sexual orientation blunt population impact, and vaccination at older ages yields reduced effectiveness because it cannot clear established infections [12].

5. Practical takeaway and research frontiers

For people who have anal sex, HPV vaccination is an effective preventive tool: it cuts infection with the HPV types that cause the majority of anal cancers and reduces the occurrence and recurrence of HSIL—especially when given before exposure and when the nonavalent vaccine’s broader coverage is used [3] [1] [2]. Remaining priorities are expanding early vaccination coverage, improving targeted vaccination and screening for high‑risk groups (MSM, people with HIV), and generating longer‑term data on invasive anal cancer endpoints and vaccine performance in immunocompromised populations to close current evidence gaps [4] [5].

Want to dive deeper?
How effective is the 9‑valent HPV vaccine specifically at preventing anal cancer compared with the quadrivalent vaccine?
What are current guidelines for HPV vaccination and anal cancer screening for men who have sex with men and people living with HIV?
How do age at vaccination and prior HPV exposure alter vaccine effectiveness against anal HSIL and cancer?