Ayer is a town located in Middlesex County, in the state of Massachusetts (MA), United States. Nestled in the New England division of the North-east region, it covers an area of 9.0 square miles (23.0 km²) and sits at an elevation of 226 ft. With a population of approximately 7,287 residents, Ayer offers a peaceful, rural atmosphere.
The town's population is composed of about 49.2% males and 50.8% females, and it has a population density of 807.87 people per square mile (311.92/km²). Ayer lies at a latitude of 42.56 and a longitude of -71.58, operating in the UTC-5.
Locals reflect a blend of American ancestry, with roots primarily in United States (7.1%), followed by English (13.8%), German (7.6%), and Scotch-Irish (0%) heritage. The town is identified by the ZIP code 01432.