In eusocial species, the sex ratio of helpers varies from female only, in taxa such as the social Hymenoptera (ants, bees, and wasps) , to an unbiased mixture of males and females, as in most termites . Hamilton suggested that this difference owes to the haplodiploid genetics of the Hymenoptera leading to females being relatively more related to their siblings . However, it has been argued that Hamilton’s hypothesis does not work [4, 5, 6, 7, 8 and 9] and that the sex of helpers could instead be explained by variation in the ecological factors that favor eusociality . Here we test these two competing hypotheses, which focus on the possible importance of different terms in Hamilton’s rule [2 and 11], with a comparative study across all sexual eusocial taxa. We find that the sex ratio of helpers (1) shows no significant correlation with whether species are haplodiploid or diploid and (2) shows a strong correlation with the ecological factor that had favored eusociality. Specifically, when the role of helpers is to defend the nest, both males and females help, whereas when the role of helpers is to provide brood care, then helpers are the sex or sexes that provided parental care ancestrally. More generally, our results confirm the ability of kin selection theory to explain the biology of eusocial species, independently of ploidy, and add support to the idea that haplodiploidy has been more important for shaping conflicts within eusocial societies than for explaining its origins [6, 12, 13, 14, 15, 16, 17, 18 and 19].