The township is in eastern Cumberland County, bordered by the borough of Mechanicsburg to the north and York County to the south. Interstate 76, the Pennsylvania Turnpike, crosses the northern part of the township from east to west, while the U.S. Route 15 freeway crosses the township from northeast to southwest. Three highway interchanges provide access from US 15 to the township, while a fourth connects to Exit 236 on the Pennsylvania Turnpike. From the US 15/I-76 interchange it is 8 miles (13 km) northeast to Harrisburg, the state capital, and 31 miles (50 km) southwest to Gettysburg, both via US 15, while it is 111 miles (179 km) east to Philadelphia and 196 miles (315 km) west to Pittsburgh via the Turnpike.
According to the United States Census Bureau, the township has a total area of 13.3 square miles (34.4 km2), of which 13.2 square miles (34.2 km2) is land and 0.1 square miles (0.3 km2), or 0.78%, is water.[4]Yellow Breeches Creek forms the southern border of the township, separating it from York County.
As of the census[5] of 2020, there were 23,183 people and 7,893 households residing in the township. The population density was 1,750.1 inhabitants per square mile (675.7/km2). The racial makeup of the township was 86% White, 6.3% African American, 0.2% Native American, 4.0% Asian, 2.4% from two or more races. Hispanic or Latino of any race were 1.9% of the population.
There were 7,893 households, out of which 19.5% had children under the age of 18 living with them, 61.5% were married couples living together, 7.5% had a female householder with no husband present, and 28.8% were non-families. 24.3% of all households were made up of individuals, and 9.4% had someone living alone who was 65 years of age or older. The average household size was 2.28 and the average family size was 2.95.
In the township the population was spread out, with 19.8% under the age of 18, 19.2% from 18 to 24, 23.3% from 25 to 44, 22.3% from 45 to 64, and 15.5% who were 65 years of age or older. The median age was 36 years. For every 100 females, there were 83.7 males. For every 100 females age 18 and over, there were 79.4 males.
The median income for a household in the township was $86,817, and the median income for a family was $65,349. Males had a median income of $45,589 versus $30,103 for females. The per capita income for the township was $45,486. About 2.9% of families and 4.2% of the population were below the poverty line, including 5.8% of those under age 18 and 4.1% of those age 65 or over.