What is now Wharton was originally incorporated as the borough of Port Oram by an Act of the New Jersey Legislature on June 26, 1895, from portions of Randolph Township and Rockaway Township, subject to the results of a referendum passed on the previous day. The name was changed to Wharton as of April 16, 1902, based on a referendum held that day.
As of the census of 2000, there were 6,298 people, 2,328 households, and 1,599 families residing in the borough. The population density was 2,882.4 people per square mile (1,110.4/km²). There were 2,394 housing units at an average density of 1,095.6/sq mi (422.1/km²). The racial makeup of the borough was 82.09% White, 4.40% African American, 0.44% Native American, 3.14% Asian, 7.21% from other races, and 2.72% from two or more races. Hispanic or Latino of any race were 23.21% of the population.
There were 2,328 households out of which 34.6% had children under the age of 18 living with them, 52.1% were married couples living together, 12.0% had a female householder with no husband present, and 31.3% were non-families. 26.5% of all households were made up of individuals and 10.4% had someone living alone who was 65 years of age or older. The average household size was 2.70 and the average family size was 3.28.
In the borough the population was spread out with 26.0% under the age of 18, 6.8% from 18 to 24, 34.0% from 25 to 44, 21.9% from 45 to 64, and 11.3% who were 65 years of age or older. The median age was 36 years. For every 100 females there were 93.5 males. For every 100 females age 18 and over, there were 88.8 males.
The median income for a household in the borough was $56,580, and the median income for a family was $64,957. Males had a median income of $42,311 versus $36,016 for females. The per capita income for the borough was $25,168. About 6.4% of families and 8.3% of the population were below the poverty line, including 15.0% of those under age 18 and 4.2% of those age 65 or over.