Formation of cell chains in phytoplankton is ecologically important, but no single factor driving the evolution of chain formation has been identified. Chain length in the diatom Skeletonema marinoi declines in response to grazer cues, which reduces grazing losses in simple laboratory incubations. Here we explore a more ecologically relevant scenario with fluctuating populations of different sized grazers, and test whether chain-length plasticity provides a selective advantage by lower grazing mortality. We used a model with empirical grazer densities, the effect of grazer cues on chain length, and size selective grazing rates. Finally we compared the model outcome with Skeletonema chain length and copepod biomass in the field. Low copepod densities induced chain-length reduction in Skeletonema, showing that the signaling system is sensitive enough to operate in nature. The model shows that reducing chain length in response to copepod cues reduces annual grazing losses by 31 and 36% compared with fixed traits with either single cells or long chains, respectively. The field measurements agree well with chain length being regulated by grazer abundances. We conclude that chain-length plasticity is a selective trait, and suggest that grazer regime could be an evolutionary driver of chain formation in phytoplankton.