This paper considers socially optimal government policies in a dynastic family model with physical capital, human capital, endogenous fertility and positive spillovers from average human capital. Such spillovers reduce human capital investment but raise fertility from their social optimum. We first characterize the social optimum with a non-convex feasible set due to the quantity?quality tradeoff concerning children. We then show that social security and education subsidization together, financed by labor income taxes, can fully eliminate the efficiency losses of the spillovers and achieve the social optimum under plausible conditions. However, none of the policies can do so alone.