Ayer, MA has a population of 2,879 and is the 9,019th largest city in the United States. The population density is 2,171 per sq mi which is 245% higher than the Massachusetts average and 2296% higher than the national average. The median age in Ayer is 45 which is approximately 15% higher than the Massachusetts average of 39. In Ayer, 56% of the population over 15 years of age are married, 86% speak English and 3% speak Spanish. 66% of Ayer residents were born in Massachusetts, 18% were born out of state, 3% were born outside of the United States and 13% were foreign born.