How social traits such as altruism and spite evolve remains an open question in evolutionary biology. One factor thought to be potentially important is demographic stochasticity. Here we provide a general theoretical analysis of the role of demographic stochasticity in social evolution. We show that the evolutionary impact of stochasticity depends on how the social action alters the recipients life cycle. If the action alters the recipients death rate, then demographic stochasticity always favours altruism and disfavours spite. On the other hand, if the action alters the recipients birth rate, then stochasticity can either favour or disfavour both altruism and spite depending on the ratio of the rate of population turnover to the population size. Finally, we also show that this ratio is critical to determining if demographic stochasticity can reverse the direction of selection upon social traits. Our analysis thus provides a general understanding of the role of demographic stochasticity in social evolution.