For groups of animals to keep together, the group members have to perform switches between staying in one place and moving to another place in synchrony. However, synchronization imposes a cost on individual animals, because they have to switch from one to the other behaviour at a communal time rather than at their ideal times. Here we model this situation analytically for groups in which the ideal times vary quasinormally and grouping benefit increases linearly with group size. Across the parameter space consisting of variation in the grouping benefit/cost ratio and variation in how costly it is to act too early and too late, the most common optimal solutions are full synchronization with the group staying together and zero synchronization with immediate dissolution of the group, if the group is too small for the given benefit/cost ratio. Partial synchronization, with animals at the tails of the distribution switching individually and the central core of the group in synchrony, occurs only at a narrow stripe of the space. Synchronization cost never causes splitting of the group into two as either zero, partial or full synchronization is always more advantageous. Stable solutions dictate lower degree of synchrony and lower net benefits than optimal solutions for a large range of the parameter values. If groups undergo repeated synchronization challenges, they stay together or quickly dissolve, unless the animals assort themselves into a smaller group with less variation in the ideal times. We conclude with arguing that synchronization cost is different from other types of grouping costs since it does not increase much with increasing group size. As a result, larger groups may be more stable than smaller groups. This results in the paradoxical prediction that when the grouping benefit/grouping cost ratio increases, the average group sizes might decrease, since smaller groups will be able to withstand synchronization challenges.