1. Group living in caterpillars may enhance individual performance due to sharing of costs associated with individual tasks when dealing with biotic or abiotic ecological factors.2. In the gregarious caterpillar Battus polydamas archidamas (Papilionidae) egg clusters and caterpillar groups vary in size. We hypothesized that individual survival would be higher in larger groups and that group living would enhance individual performance: shorter development time and/or reduced frequency of (presumably costly) defensive reactions in larvae and larger adult size. We also tested whether the group size conferring the highest survival to laboratory‐reared caterpillars matched the most frequent egg clutch size in the field.3. We collected egg clutches in the field and reared caterpillars in groups of 1, 6, 10, and 14 individuals. We quantified larval survival and stage duration as well as adult mass under laboratory conditions, excluding natural enemies. We also recorded the frequency of larval defensive reactions (thrashing and osmeterium display) against a tactile stimulus of first‐instar larvae.4. Group living enhanced caterpillar survival, particularly during the first instars, when caterpillars are 100% gregarious. Groups of intermediate size reduced larval development time but group living did not affect adult mass. Individual caterpillars in groups showed defensive reactions less frequently than solitary individuals, revealing a cost‐saving feature of gregariousness for this swallowtail species. The most frequent clutch size in the field (9–10 eggs) did not match the larval group with highest survival (14 individuals), but did match the group with shortest development time.