Upper Frederick Township is a township in Montgomery County, Pennsylvania, United States. The population was 3,703 at the 2020 census.
 The Henry Antes House, Bridge in Upper Frederick Township (Fagleysville, Pennsylvania), Bridge in Upper Frederick Township (Zieglersville, Pennsylvania), John Englehardt Homestead, and Conrad Grubb Homestead are listed on the National Register of Historic Places. The Henry Antes House is also listed as a National Historic Landmark.
 According to the United States Census Bureau, the township has a total area of 10.1 square miles (26.3 km2), of which 10.0 square miles (25.8 km2)  is land and 0.2 square mile (0.4 km2)  (1.68%) is water. It is drained by the Schuylkill River via the Perkiomen Creek, which forms its eastern boundary. Villages within the township include Frederick (also in New Hanover Township,) Obelisk (also in Lower Frederick Township,) and Perkiomenville (also in Marlborough Township.)
 As of the 2010 census, the township was 96.1% White, 1.5% Black or African American, 0.1% Native American, 0.6% Asian, 0.1% Native Hawaiian, and 1.0% were two or more races. 2.0% of the population were of Hispanic or Latino ancestry.
 As of the census of 2000, there were 3,141 people, 1,045 households, and 811 families residing in the township.  The population density was 315.1 inhabitants per square mile (121.7/km2).  There were 1,088 housing units at an average density of 109.2 per square mile (42.2/km2).  The racial makeup of the township was 97.01% White, 1.43% African American, 0.19% Native American, 0.29% Asian, 0.16% from other races, and 0.92% from two or more races. Hispanic or Latino of any race were 0.51% of the population.
 There were 1,045 households, out of which 40.8% had children under the age of 18 living with them, 70.4% were married couples living together, 5.1% had a female householder with no husband present, and 22.3% were non-families. 17.7% of all households were made up of individuals, and 5.1% had someone living alone who was 65 years of age or older.  The average household size was 2.79 and the average family size was 3.19.
 In the township the population was spread out, with 26.8% under the age of 18, 4.8% from 18 to 24, 33.1% from 25 to 44, 20.8% from 45 to 64, and 14.5% who were 65 years of age or older.  The median age was 38 years. For every 100 females, there were 94.7 males.  For every 100 females age 18 and over, there were 89.9 males.
 The median income for a household in the township was $60,742, and the median income for a family was $63,902. Males had a median income of $42,782 versus $33,365 for females. The per capita income for the township was $22,640.  About 2.5% of families and 3.4% of the population were below the poverty line, including 3.8% of those under age 18 and 3.6% of those age 65 or over.
 As of 2005 there were 29.97 miles (48.23 km) of public roads in Upper Frederick Township, of which 13.41 miles (21.58 km) were maintained by the Pennsylvania Department of Transportation (PennDOT) and 16.56 miles (26.65 km) were maintained by the township.
 Pennsylvania Route 29 and Pennsylvania Route 73 are the primary highway serving Upper Frederick Township. PA 29 follows the Gravel Pike on a north-south alignment in the northeastern corner of the township. PA 73 follows Big Road along northwest-southeast alignment in the southwestern portion of the township.
 Results in presidential elections have gone predominantly in favor of Republican candidates since at least the early 1990s.
 Upper Frederick Township is part of the Boyertown Area School District