On June 26, 1862, Confederate Gen. Robert E. Lee launched a series of assaults against the right of Union Maj. Gen. George B. McClellan's army positioned along Beaver Dam Creek, just east of Mechanicsville. During the ensuing Battle of Beaver Dam Creek (also known by the names Mechanicsville and Ellerson's Mill), Union forces repulsed the Confederate attacks and afterward withdrew to a new position along Boatswain Creek near Gaines' Mill. The Beaver Dam Creek engagement was the second in the series of American Civil War battles known as the Seven Days' Battles. A small portion of the battlefield has been preserved as part of the Richmond National Battlefield Park, a park area administered by the National Park Service.
Geography\nMechanicsville is located at 37°37'9" North, 77°21'18" West (37.619168, -77.355013)1.
According to the United States Census Bureau, the town has a total area of 73.7 km² (28.5 mi²). 73.5 km² (28.4 mi²) of it is land and 0.2 km² (0.1 mi²) of it is water. The total area is 0.28% water.
Demographics\nAs of the census of 2000, there are 30,464 people, 11,607 households, and 8,832 families residing in the town. The population density is 414.5/km² (1,073.3/mi²). There are 11,915 housing units at an average density of 162.1/km² (419.8/mi²). The racial makeup of the town is 90.80% White, 6.40% African American, 0.43% Native American, 0.90% Asian, 0.01% Pacific Islander, 0.49% from other races, and 0.97% from two or more races. 1.18% of the population are Hispanic or Latino of any race.
There are 11,607 households out of which 39.4% have children under the age of 18 living with them, 62.7% are married couples living together, 10.6% have a female householder with no husband present, and 23.9% are non-families. 19.7% of all households are made up of individuals and 7.4% have someone living alone who is 65 years of age or older. The average household size is 2.61 and the average family size is 3.00.
In the town the population is spread out with 26.9% under the age of 18, 5.7% from 18 to 24, 33.6% from 25 to 44, 22.5% from 45 to 64, and 11.2% who are 65 years of age or older. The median age is 36 years. For every 100 females there are 92.8 males. For every 100 females age 18 and over, there are 88.4 males.
The median income for a household in the town is $57,032, and the median income for a family is $62,209. Males have a median income of $41,338 versus $30,217 for females. The per capita income for the town is $24,068. 3.3% of the population and 2.8% of families are below the poverty line. Out of the total people living in poverty, 3.6% are under the age of 18 and 4.1% are 65 or older.