Background With the world's largest population, HIV spread in China has been closely watched and widely studied by its government and the international community. One important factor that might contribute to the epidemic is China's numerous surplus of men, due to its imbalanced sex ratio in newborns. However, the sex ratio in the human population is often assumed to be 1:1 in most studies of sexually transmitted diseases (STDs). Here, a mathematical model is proposed to estimate the population size in each gender and within different stages of reproduction and sexual activities. This population profiling by age and gender will assist in more precise prediction of HIV incidences. Method The total population is divided into 6 subgroups by gender and age. A deterministic compartmental model is developed to describe birth, death, age and the interactions among different subgroups, with a focus on the preference for newborn boys and its impact for the sex ratios. Data from 2003 to 2007 is used to estimate model parameters, and simulations predict short-term and long-term population profiles. Results The population of China will go to a descending track around 2030. Despite the possible underestimated number of newborns in the last couple of years, model-based simulations show that there will be about 28 million male individuals in 2055 without female partners during their sexually active stages. Conclusion The birth rate in China must be increased to keep the population viable. But increasing the birth rate without balancing the sex ratio in newborns is problematic, as this will generate a large number of surplus males. Besides other social, economic and psychological issues, the impact of this surplus of males on STD incidences, including HIV infections, must be dealt with as early as possible.