Food sharing is relatively widespread across the animal kingdom, but research into the socio-ecological factors affecting this activity has predominantly focused on primates. These studies do suggest though that food tolerance is linked to the social relationship with potential partners. Therefore, the current study aimed to assess the social factors which influence food tolerance in two canids: wolves and dogs. We presented wolves and dogs with two paradigms: dyadic tolerance tests and group carcass feedings. In the dyadic setting, the affiliative relationship with a partner was the most important factor, with a strong bond promoting more sharing in both species. In the group setting, however, rank was the primary factor determining feeding behavior. Although the dominant individuals of both species defended the carcass more than subordinates, in the dogs, the subordinates mostly stayed away from the resource and the most dominant individual monopolized the food. In the wolves, the subordinates spent as much time as dominant individuals in proximity to, and feeding from, the carcass. Furthermore, subordinate wolves were more able to use persistence strategies than the dogs were. Feeding interactions in the wolves, but not dogs, were also modulated by whether the carcass was on the ground or hanging from a tree. Overall, the social relationship with a partner is important in food distribution in wolves and dogs, but the precise effects are dependent on species and feeding context. We consider how the different socio-ecologies of the two species may be linked to these findings.Significance statementDespite the fact that food sharing is relatively widespread in the animal kingdom, the specific factors underlying whether an animal will share with a specific individual are little understood. When it comes to decisions about food sharing in wolves and dogs, friendship is the deciding factor if it is just two of you, but in a bigger group rank position decides your access to the spoils. What is more, it seems that rank positioning is even more important in dogs than wolves as dominant dogs keep the food for themselves while each wolf pack member has a chance to eat. This is the first evidence that the importance of the social relationship in food sharing is dependent on the feeding context in canids.Electronic supplementary materialThe online version of this article (doi:10.1007/s00265-017-2339-8) contains supplementary material, which is available to authorized users.