A general equilibrium model that characterizes the gap between optimal and equilibrium fertility and investment in human capital is developed. The aggregate production function exhibits increasing returns to population arising from specialization, but households face a quantity–quality trade-off when choosing their fertility and how much education these children receive. We show that equilibrium fertility is too low and investment per child is too high, in contrast to a current planner who internalizes the externality of current fertility on the next generation's productivity. We next introduce mortality of young adults in the model and assume that households have a precautionary demand for children. Human capital investment lowers next generation mortality. This model endogenously generates a demographic transition but, since households do not internalize the negative effects of human capital on mortality, the equilibrium demographic transition takes place many years later than the efficient solution. We show that ${\rm {\cal A}}$-efficient fertility and human capital investment pair can switch; in high-mortality regimes, ${\rm {\cal A}}$-efficient fertility is lower than equilibrium fertility, and ${\rm {\cal A}}$-efficient human capital investment is higher than equilibrium investment. In the zero mortality regime, however, ${\rm {\cal A}}$-efficient fertility exceeds equilibrium fertility, and ${\rm {\cal A}}$-efficient human capital investment is lower than the equilibrium choice.