Somerville is a city located directly to the northwest of Boston, and north of Cambridge, in Middlesex County, Massachusetts, United States. As of the 2020 United States Census, the city had a total population of 81,045 people. With an area of 4.12 square miles (10.7 km2), the city has a density of 19,671/sq mi (7,595/km2), making it the most densely populated municipality in New England and the 16th most densely populated incorporated municipality in the country.