Hampton is located at 42°56'15" North, 70°50'21" West (42.937500, -70.839444).
According to the United States Census Bureau, the town has a total area of 5.43 mi2 (14.06 km2). 5.36 mi2 (13.89 km2) of it is land and 0.06 mi2 (0.17 km2) of it is covered by water. The total area is 1.18% water.
Hampton is located in the Eastern Standard Time (EST) timezone, GMT-05:00. It observes Daylight Saving Time (DST).