Models of sex-ratio evolution in structured populations are derived with G. R. Price's covariance form for the hierarchical analysis of natural selection (1970, Nature 227, 520-521). Previous work on competition among related males for mates (local mate competition), competition among related females for a limiting resource (local resource competition), inbreeding, group selection, and asymmetry of genetic inheritance between males and females, are subsumed under a general formulation for sex-ratio biases in structured populations. I found that the evolutionarily stable strategy sex ratio (males : females) for diploids is 1 -p",: 1 -pf, where p m is the regression coefficient of relatedness of the controlling genotypes on males competing for mates, pf is the regression of controlling genotypes on females that compete for a fixed, limiting resource, and there is no inbreeding. For inbreeding and no competition among females, the evolutionarily stable strategy is 1-p m : 1 + p,,,,, where NT, is the regression of controlling genotypes on females' mates.CC 1986 Academic Press, Inc.Many interesting behaviors reflect a tension between the selfish pursuits of some individual or entity within a local group, and the extent to which the ultimate success of that individual also depends on the vigor of its local group. To name just a few of the most popular puzzles, there are the (almost) sterile castes of social insects, in which workers rarely produce offspring, but perhaps gain by the greater success of their colony, which contains a high proportion of identical genes (Hamilton, 1964(Hamilton, , 1972. There is the kin group, where the principle of self-sacrifice for a relative depending on the level of relatedness (Hamilton, 1964) has been accepted as one of the guiding principles of behavioral ecology. Meiotic and gametic drive are further examples the increased success of part of the genome that possibly reduces the overall success of the genome (e.g., Haldane, 1932;Hamilton, 1967;Alexander and Borgia, 1978;Eberhard, 1980;Cosmides and Tooby, 1981). The most recent slogan capturing this idea is "selfish DNA with self-restraint": genetic elements that can replicate and spread within the genome; but the ultimate success of the elements (relative 312