The mallard is widely distributed across the Northern and Southern Hemispheres; in North America its range extends from southern and central Alaska to Mexico, the Hawaiian Islands, across the Palearctic, from Iceland and southern Greenland and parts of Morocco (North Africa) in the west, Scandinavia and Britain to the north, and to Siberia, Japan, and South Korea. Also in the east, it ranges to south-eastern and south-western Australia and New Zealand in the Southern hemisphere It is strongly migratory in the northern parts of its breeding range, and winters farther south.
The mallard inhabits a wide range of habitats and climates, from the Arctic tundra to subtropical regions. It is found in both fresh- and salt-water wetlands, including parks, small ponds, rivers, lakes and estuaries, as well as shallow inlets and open sea within sight of the coastline. Water depths of less than 0.9 metres (3.0 ft) are preferred, with birds avoiding areas more than a few metres deep. They are attracted to bodies of water with aquatic vegetation.
Mallards usually form pairs (in October and November in the Northern Hemisphere) until the female lays eggs at the start of the nesting season, which is around the beginning of spring. At this time she is left by the male who joins up with other males to await the moulting period, which begins in June (in the Northern Hemisphere). During the brief time before this, however, the males are still sexually potent and some of them either remain on standby to sire replacement clutches (for female mallards that have lost or abandoned their previous clutch) or forcibly mate with females that appear to be isolated or unattached regardless of their species and whether or not they have a brood of ducklings.
Nesting sites are typically on the ground, hidden in vegetation where the female's speckled plumage serves as effective camouflage, but female mallards have also been known to nest in hollows in trees, boathouses, roof gardens and on balconies, sometimes resulting in hatched offspring having difficulty following their parent to water.