BackgroundThe life expectancy of people with HIV starting combination antiretroviral therapy (ART) has increased substantially over the past 25 years. However, individuals treated before 1996 or with less effective and more toxic regimens than those currently available might have a worse prognosis. We estimated life expectancy from 2015 onwards, comparing people with HIV who started ART in different time periods since 1996. MethodsData were derived from 20 European and North American cohorts (Antiretroviral Therapy Cohort Collaboration and UK Collaborative HIV Cohort Study), for people with HIV who started potent ART after 1996 and were still on ART in 2015, or who started ART after 2015 and survived for at least 1 year. Follow-up started on or after Jan 1, 2015. Associations between mortality and demographic characteristics and biomarkers (CD4 and CD8 count in cells per μL and HIV-1 RNA viral load) at follow-up start were estimated using multivariable Poisson models. Estimated mortality rates in 5-year age bands were entered into life tables that contain follow-up information to estimate expected remaining life expectancy, stratified by sex and variables associated with mortality, and standardised to the proportion of people with HIV in each stratum. Life expectancy was compared with the French general population, as more data were available for France than for other countries included in the analyses. FindingsOf the 206 891 people with HIV eligible for inclusion from the cohort data, 5780 died during 619 356 person-years of follow-up after 2015. For women, the standardised remaining years of life expectancy at age 40 years for individuals starting ART between 1996 and 2014 was 36·0 years (95% CI 35·4–36·6), whereas it was 39·4 years (39·0–39·8) for individuals starting after 2015 (general population comparator 46·0 years). Corresponding figures for men were 34·7 years (34·1–35·3) and 37·2 years (36·6–38·8), respectively (general population comparator 40·3 years). For women starting ART between 1996 and 2014, with a CD4 count of 0–49 cells per μL at the commencement of follow-up, remaining life expectancy at age 40 years was 19·4 years (95% CI 18·2–20·6), rising to 40·4 years (40·0–40·8) for people with a CD4 count of 500 cells per μL or greater at commencement of follow-up. Corresponding figures for women starting ART after 2015 were 24·9 years (23·9–25·9) and 42·6 years (422–43·0), respectively. For men starting ART between 1996 and 2014 with a CD4 count of 0–49 cells per μL at commencement of follow-up, remaining life expectancy at age 40 years was 18·2 years (17·0–19·4), rising to 38·2 years (37·6–38·8) for men with a CD4 count of 500 cells per μL or more at commencement of follow-up. Corresponding remaining life expectancy for men starting ART after 2015 was 23·7 years (22·7–24·7) and 39·5 years (38·9–40·1), respectively. InterpretationFor people with HIV on long-term ART with high CD4 cell counts, life expectancies are estimated to be close to those of the general population, regardless of when they started ART. However, for people with HIV with low CD4 cell counts, estimates of remaining life expectancy are up to 30 years lower than in the general population, indicating the importance of early diagnosis and sustained treatment. FundingUS National Institute on Alcohol Abuse and Alcoholism, UK Medical Research Council.