Answer
The population of Gloucester, Massachusetts was 29,729 according to the 2020 U.S. Census. This was a decrease of 3.2% from the 2010 census, when the population was 30,727. The population density was 2,190.3 people per square mile (843.2/km²). There were 13,310 housing units at an average density of 986.4 per square mile (381.2/km²).