Marlborough is located in Middlesex county Massachusetts with a geographic area of 20.9 square miles. The total population in Marlborough is 39,663 with 47.8% male and 52.2% female. Children under age 5 represent 6.7% of the population, under age 18 equal 20.0% of the population and over age 65 is 15.2% of the population. The median household income is $83,469, per capita income is $42,147. There are a total of 16,044 housing units with 57.9% owner occupied. Education includes 22.0% of residents that are high school graduates and 43.7% with a bachelor's degree or higher. The average temperature in Marlborough in the summer is 70 degrees, and in the winter 30 degrees.