The town was granted by Governor William Dummer on 20 May 1727 to the Reverend Joseph Adams and others. Settlement commenced in 1765, and two years later Barnstead was incorporated as a town by Governor John Wentworth. Many of the settlers came from Barnstable, Massachusetts, and Hempstead, New York - the name is taken from these two. Although not mountainous, the terrain forms large swells, good for grazing. By 1830, when the population was 2,047, the town contained about 2,500 sheep. Farmers found the soil easy to cultivate and productive. The Suncook River and its tributaries provided water power for mills. By 1859, industries included a woolen cloth factory, seven sawmills, four shingle mills, four clapboard mills, one grooving machine, one turning machine, and two tanneries. Barnstead manufactured large amounts of lumber, which it supplied to neighboring towns. Barnstead was served in 1874 by the Concord and Rochester Railroad, and an extension of the Suncook Valley Railroad was being planned.
As of the census of 2000, there were 3,886 people, 1,422 households, and 1,096 families residing in the town. The population density was 92.7 people per square mile. There were 1,994 housing units at an average density of 47.6 per square mile. The racial makeup of the town was 97.74% White, 0.62% African American, 0.31% Native American, 0.59% Asian, 0.05% from other races, and 0.69% from two or more races. Hispanic or Latino of any race were 0.59% of the population. There were 1,422 households, out of which 34.9% had children under the age of 18 living with them, 66.2% were married couples living together, 6.3% had a female householder with no husband present, and 22.9% were non-families. 17.0% of all households were made up of individuals, and 5.3% had someone living alone who was 65 years of age or older. The average household size was 2.73 and the average family size was 3.08. In the town, the population was spread out, with 26.4% under the age of 18, 6.2% from 18 to 24, 29.4% from 25 to 44, 27.1% from 45 to 64, and 10.9% who were 65 years of age or older. The median age was 39 years. For every 100 females, there were 104.0 males. For every 100 females age 18 and over, there were 102.4 males. The median income for a household in the town was $47,449, and the median income for a family was $49,404. Males had a median income of $34,130 versus $24,904 for females. The per capita income for the town was $19,773. About 2.8% of families and 3.8% of the population were below the poverty line, including 6.4% of those under age 18 and 4.7% of those age 65 or over.