Gloucester is located in Essex county Massachusetts with a geographic area of 26.2 square miles. The total population in Gloucester is 30,291 with 49.6% male and 50.4% female. Children under age 5 represent 5.6% of the population, under age 18 equal 16.3% of the population and over age 65 is 24.1% of the population. The median household income is $76,260, per capita income is $44,630. There are a total of 13,410 housing units with 62.7% owner occupied. Education includes 24.2% of residents that are high school graduates and 40.5% with a bachelor's degree or higher. The average temperature in Gloucester in the summer is 70 degrees, and in the winter 30 degrees.