Beyond natural sterility, there are two main types of childlessness: one driven by poverty and another by the high opportunity cost to child-rearing. We argue that taking childlessness and its causes into account matters for assessing the impact of development policies on fertility. We measure the importance of the components of childlessness with a structural model of fertility and marriage. Deep parameters are identified using census data from 36 developing countries. On average, one more year of education decreases poverty-driven childlessness by 0.75 percentage points, but increases opportunity-cost-driven childlessness by 0.57 percentage points from the 9th year of schooling onwards. Neglecting the endogenous response of marriage and childlessness leads to overestimating the effectiveness of family planning policies, except where highly educated mothers are also heavily affected by unwanted births, and to underestimating the effect of promoting gender equality on fertility, except in countries where poverty-driven childlessness is high