Sandwich is a town in Barnstable County, Massachusetts, United States. As of the 2010 census, the town had a population of 20,675. The village and census-designated place (CDP) of Forestdale is in the town.