BackgroundHIV is one of the deadliest epidemics and one of the most critical global public health issues. Some are susceptible to die among people living with HIV and some survive longer. The aim of the present study is to use mixture cure models to estimate factors affecting short- and long-term survival of HIV patients.MethodsThe total sample size was 2170 HIV-infected people referred to the disease counseling centers in Kermanshah Province, in the west of Iran, from 1998 to 2019. A Semiparametric PH mixture cure model and a mixture cure frailty model were fitted to the data. Also, a comparison between these two models was performed.ResultsBased on the results of the mixture cure frailty model, antiretroviral therapy, tuberculosis infection, history of imprisonment, and mode of HIV transmission influenced short-term survival time (p-value < 0.05). On the other hand, prison history, antiretroviral therapy, mode of HIV transmission, age, marital status, gender, and education were significantly associated with long-term survival (p-value < 0.05). The concordance criteria (K-index) value for the mixture cure frailty model was 0.65 whereas for the semiparametric PH mixture cure model was 0.62.ConclusionThis study showed that the frailty mixture cure models is more suitable in the situation where the studied population consisted of two groups, susceptible and non-susceptible to the event of death. The people with a prison history, who received ART treatment, and contracted HIV through injection drug users survive longer. Health professionals should pay more attention to these findings in HIV prevention and treatment.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12874-023-01949-x.