Westford is located in Middlesex county Massachusetts with a geographic area of square miles. The total population in Westford is 24,566 with 48.4% male and 51.6% female. Children under age 5 represent 5.2% of the population, under age 18 equal 27.0% of the population and over age 65 is 13.2% of the population. The median household income is $149,437, per capita income is $57,410. There are a total of 8,544 housing units with 88.5% owner occupied. Education includes 8.9% of residents that are high school graduates and 72.5% with a bachelor's degree or higher. The average temperature in Westford in the summer is 70 degrees, and in the winter 30 degrees.