A test for heritability of the sex ratio in human genealogical data is reported here, with the finding that there is significant heritability of the parental sex ratio by male, but not female offspring. A population genetic model was used to examine the hypothesis that this is the result of an autosomal gene with polymorphic alleles, which affects the sex ratio of offspring through the male reproductive system. The model simulations show that an equilibrium sex ratio may be maintained by frequency dependent selection acting on the heritable variation provided by the gene. It is also shown that increased mortality of pre-reproductive males causes an increase in male births in following generations, which explains why increases in the sex ratio have been seen after wars, also why higher infant and juvenile mortality of males may be the cause of the male-bias typically seen in the human primary sex ratio. It is concluded that various trends seen in population sex ratios are the result of changes in the relative frequencies of the polymorphic alleles of the proposed gene. It is argued that this occurs by common inheritance and that parental resource expenditure per sex of offspring is not a factor in the heritability of sex ratio variation.