The expectation is that the phenology of an herbivore is influenced by abiotic factors and its own population density during development. In this study, we investigated how the pupal density affected the pupal traits and emergence of Thaumetopoea pityocampa moths over a period of 3 years in two clearings in a pine forest. The pupae were larger in years when the pupal density was high and in the clearing exposed to less solar radiation. There was no relationship between the time of pupation and pupal size. Large pupae were positively correlated with an early emergence of adult moths and a longer period of adult emergence. Up to 13.9% of the pupae developed without cocoons, especially in years when they were abundant, but this did not affect the emergence of the moths. Incidence of pupal diapause was density-dependent and only occurred at a low level in dense populations. Overall, our results indicate that gregariousness confers important fitness-related advantages in this species.