Ashby is located in Middlesex county Massachusetts with a geographic area of square miles. The total population in Ashby is 3,211 with 52.3% male and 47.7% female. Children under age 5 represent 2.7% of the population, under age 18 equal 16.9% of the population and over age 65 is 18.2% of the population. The median household income is $97,269, per capita income is $45,938. There are a total of 1,261 housing units with 93.3% owner occupied. Education includes 25.4% of residents that are high school graduates and 40.8% with a bachelor's degree or higher. The average temperature in Ashby in the summer is 70 degrees, and in the winter 30 degrees.