Understanding the factors that modulate the evolution of virus populations is essential to design efficient control strategies. Mathematical models predict that factors affecting viral within-host evolution may also determine that at the between-host level. Although HIV-1 within-host evolution has been associated with clinical factors used to monitor AIDS progression, such as patient age, CD4 cells count, viral load, and antiretroviral experience, little is known about the role of these clinical factors in determining between-host HIV-1 evolution. Moreover, whether the relative importance of such factors in HIV-1 evolution vary in adult and children patients, in which the course of infection is different, has seldom been analysed. To address these questions, HIV-1 subtype B (HIV-1B) pol sequences of 163 infected children and 450 adults of Madrid, Spain, were used to estimate genetic diversity, rates of synonymous and non-synonymous mutations, selection pressures and frequency of drug-resistance mutations (DRMs). The role and relative importance of patient age, %CD4, CD4/mm3, viral load, and antiretroviral experience in HIV-1B evolution was analysed. In the pediatric HIV-1B population, three clinical factors were primary predictors of virus evolution: Higher HIV-1B genetic diversity was observed with increasing children age, decreasing CD4/mm3 and upon antiretroviral experience. This was mostly due to higher rates of non-synonymous mutations, which were associated with higher frequency of DRMs. Using this data, we have also constructed a simple multivariate model explaining between 55% and 66% of the variance in HIV-1B evolutionary parameters in pediatric populations. On the other hand, the analysed clinical factors had little effect in adult-infecting HIV-1B evolution. These findings highlight the different evolutionary dynamics of HIV-1B in children and adults, and contribute to understand the factors shaping HIV-1B evolution and the appearance of drug-resistance mutation in pediatric patients.