The evolution of cooperation requires benefits of group living to exceed costs. Hence, some components of fitness are expected to increase with increasing group size, whereas others may decrease because of competition among group members. The social spiders provide an excellent system to investigate the costs and benefits of group living: they occur in groups of various sizes and individuals are relatively short-lived, therefore life history traits and Lifetime Reproductive Success (LRS) can be estimated as a function of group size. Sociality in spiders has originated repeatedly in phylogenetically distant families and appears to be accompanied by a transition to a system of continuous intra-colony mating and extreme inbreeding. The benefits of group living in such systems should therefore be substantial. We investigated the effect of group size on fitness components of reproduction and survival in the social spider Stegodyphus dumicola in two populations in Namibia. In both populations, the major benefit of group living was improved survival of colonies and late-instar juveniles with increasing colony size. By contrast, female fecundity, female body size and early juvenile survival decreased with increasing group size. Mean individual fitness, estimated as LRS and calculated from five components of reproduction and survival, was maximized for intermediate- to large-sized colonies. Group living in these spiders thus entails a net reproductive cost, presumably because of an increase in intra-colony competition with group size. This cost is traded off against survival benefits at the colony level, which appear to be the major factor favouring group living. In the field, many colonies occur at smaller size than expected from the fitness curve, suggesting ecological or life history constraints on colony persistence which results in a transient population of relatively small colonies.