The existence of adaptive host manipulation by parasites has received increasing empirical support in recent years. Here I develop an optimality model of the extent of host manipulation, incorporating within-host group size, relatedness and a range of realistic cost–benefit functions. The model highlights the cooperative nature of host manipulation, and the potential for cheating this entails. When relatedness in parasite groups is minimal, manipulation is suppressed, but not eradicated, reflecting the importance of interhost selection. A distinctive threshold phenomenon is predicted for a wide range of parameter values. Below the group size threshold, manipulation is zero. Above the threshold, the predicted behaviour depends critically on the biological details of the individual–group interaction. The host–manipulation model is discussed in the light of two potential applications. If parasite group size is assumed to be a static characteristic of a parasite species or strain, the model generates a set of comparative predictions best suited to macroparasite systems. Additionally, the model can be used to predict density–dependent behavioural changes in expanding groups of parasites, as seen in quorum-sensing bacteria.