This study investigated the costs and benefits of flocking in white-fronted geese Anser albifrons foraging on rice grains in Japan. The time budgets of focal geese were recorded, and the effects of flock size on the proportions of time spent in vigilant and agonistic behaviour were tested. The results showed that the decline in vigilance level and consequent increase in foraging time were beneficial results of flocking whereas agonistic interactions, a potential cost of flocking, did not increase with increasing flock size. However, seasonal variation in flock size suggested that exploitative competition could be a cost of flocking; the sizes of flocks in spring, when resource depletion had progressed, were significantly reduced compared with those in autumn. An experimental increase in rice density resulted in a significant increase in flock size. We conclude that the flock size of foraging white-fronted geese is a result of compromise between a constant benefit of flocking (i.e. decline in vigilance level) and a cost of flocking varying with food abundance (i.e. exploitative competition).