China and India, two Asian countries that experienced a rapid decline in fertility since the middle of the twentieth century, are the focus of this paper. Although there is no doubt that lower fertility levels have many positive effects on the economy, development and sustainability, little is known about the optimal transition from high to medium or even low levels of fertility. Firstly, implementing policies that have the potential to reduce fertility is costly. Secondly, additional costs arise from adapting the infrastructure to a population that fluctuates quickly not only in terms of size but also with respect to the age structure. We apply an intertemporal optimisation model that takes the costs and benefits of fertility decline into account. The optimal time path depends on the cost structure, the planning horizon and the initial conditions. In the case of a long planning horizon and high initial fertility, it may even be optimal to reduce fertility temporarily below replacement level in order to slow down population growth at an early stage. A key finding of our formal investigation is that, under the same plausible parameter settings, the optimal paths for China and India differ substantially. Moreover, our analysis shows that India, where the fertility decline emerged as a consequence of societal and economic developments, followed a path closer to the optimal fertility transition than China, where the fertility decline was state-imposed. The mathematical approach deployed for this analysis provides insights into the optimal long-term development of fertility and allows for policy conclusions to be drawn for other countries that are still in the fertility transition process.