Spencer is a town in Worcester County, Massachusetts, United States. The population was 11,992 at the 2020 census.