Social group size may affect the potential for sperm competition, and this in turn may favour ontogenetic adjustments in testicular mass according to the likely requirements for sperm and spermatophore production. In a number of comparative analyses of testis mass among vertebrate species that differ in mating system or social organization, increasing potential for sperm competition is associated with larger testis size. Intraspecific phenotypic plasticity should be able to produce the same pattern if social group size is heterogenous and reflects differing degrees of average sperm competition, but this intraspecific effect is less well studied. We tested the effect of social groups on both male and female investment in the simultaneously hermaphroditic leech, Helobdella papillornata. Leeches were placed in groups of one, two, four or eight. Sexual investment at the onset of reproductive maturity was quantified as the total testisac volume for male function and total egg volume for female function. We found that testisac volume (statistically adjusted for body size) showed a significant increase with increasing group size. Total egg volume (also adjusted for body size) was unaffected by group size. Our findings indicate adaptive developmental plasticity in male gonad investment in response to the potential for sperm competition.