Waltham is a town in Hancock County, Maine, United States. The population was 332 at the 2020 census. According to the United States Census Bureau, the town has a total area of 32.89 square miles, of which 29.67 square miles is land and 3.22 square miles is water.