Shirley is located in Middlesex county Massachusetts with a geographic area of 1.3 square miles. The total population in Shirley is 1,716 with 56.6% male and 43.4% female. Children under age 5 represent 4.5% of the population, under age 18 equal 13.8% of the population and over age 65 is 22.2% of the population. The median household income is $61,797, per capita income is $36,913. There are a total of 863 housing units with 57.9% owner occupied. Education includes 39.4% of residents that are high school graduates and 22.2% with a bachelor's degree or higher. The average temperature in Shirley in the summer is 70 degrees, and in the winter 30 degrees.