Sex-ratio theory states that if the fitness costs to the parents of producing one offspring's sex relative to the other are higher, parents should discount these costs by producing fewer individuals of the more costly sex. In the co-operatively breeding Seychelles warbler (Acrocephalus sechellensis) mothers adaptively modify the sex of their single egg toward daughters, the helping sex, when living on territories with rich resources where helpers increase parental reproductive success, but toward sons, the dispersing sex, when living on territories where resources are scarce and/or no helping benefits accrue. By modifying offspring sex ratio, parents maximize their inclusive fitness benefits. Pairs in high-quality territories gained significantly more inclusive fitness benefits (through helping and reproducing offspring) from the production of daughters than from sons, and vice versa in low-quality territories (through reproducing offspring). Experimental manipulation of the offspring's sex shows that the consequences of sex allocation are adaptive for parents on high-quality territories. On high-quality territories with female production, breeding pairs raising step-daughters gained significantly higher inclusive benefits (through indirect and direct fitness gains) than by raising step-sons.