Syphilis infection, age, gender, sexual behaviour, length of HIV infection and length of ARV treatment are suspected to be associated with amount of cluster of differentiation 4 (CD4+)T-cells (CD4+ T-cell) and CD4+ T-cells: CD8+ T-cells ratio (CD4:CD8) of HIV patients on ARV. However, the evidence remains lacking. The aim of this cross-sectional study on April 24th to June 20th, 2019 was to determine the association of syphilis infection and other risk factors (age, gender, sexual behavior, length of HIV infection and ARV treatment) with the immunity of patients with HIV on ARV based on T CD4+ and CD4:CD8, and got factors those have an influence to T CD4+ and CD4:CD8. Seventy-four subjects with age ≥18 years old with HIV on ARV from Voluntary Counselling Test (VCT) Outpatients of Dr. Moewardi General Hospital in Surakarta (DMGHS) had been examined for syphilis, T CD4+ count and CD4:CD8 in Clinical Pathology Laboratory of DMGHS. Other data had been completed from the anamnesis and VCT data system. All data had been processed with SPSS version 21. Multivariate logistic regression following bivariate analysis of the Chi-Square test was used for categorical variables. Bivariate analysis showed a significant association between age, length of HIV infection and length of ARV treatment to T CD4+ count and significant association between sexual behavior, length of HIV infection, and length of ARV treatment to CD4:CD8 (p<0.05). Multivariate analysis showed that the prevalence of CD4≤500 was higher in male Prevalence Ratio (PR)=3.256; p=0.038) than that of female and subjects aged >42 y.o. compared to those aged >18-42 y.o. (PR=3.451; p=0.047). The PR of CD4:CD8<0.3 in anal sex (PR=3.575; p=0.049) was higher than that of vaginal sex. The PR of CD4≤500 (PR=0.271; p=0.020) and CD4:CD8<0.3 (PR=0.125; p=0.001) in subjects with length of HIV >5 years were lower than those in HIV 0-5 years. Age, gender, and length of HIV potentially affect the probability of T CD4+≤500. Sexual behavior and length of HIV potentially affect the probability of CD4:CD8<0.3. Both CD4 and CD4:CD8 ratio must be tested at baseline and follow-up.