A flock is a group of birds conducting flocking behavior in the midst of flight, or while foraging. The term is akin to the herd amongst mammals. The benefits of aggregating in flocks are varied and flocks will form explicitly for specific purposes. Flocking also has costs, particularly to socially subordinate birds, which are bullied by more dominant birds; birds may also sacrifice feeding efficiency in a flock in order to gain other benefits. The principal benefits are safety in numbers and increased foraging efficiency. Defense against predators is particularly important in closed habitats such as forests where predation is often by ambush and early warning provided by multiple eyes is important, this has led to the development of many mixed-species feeding flocks. These multi-species flocks are usually composed of small numbers of many species, increasing the benefits of numbers but also increasing potential competition for resources.
Group size is a major aspect of the social environment of gregarious animals. However, one has to be careful when using group size measures to characterize animal sociality, because average individuals live in groups larger than mean group size.
In Denmark, there is a biannual phenomenon known as sort sol (Danish for "black sun"), when flocks of European starlings gather in vast numbers, creating complex shapes against the sky.