Hamilton is a city in and the county seat of Ravalli County, Montana, United States. The population was 3,705 at the 2000 census. Significant outlying population growth is shown in the area; the ZIP Code Tabulation Area for Hamilton's ZIP Code, 59840, had a population of 12,327 at the 2000 census.