As of the census of 2000, there were 6,338 people, 2,556 households, and 1,671 families residing in the borough. The population density was 3,113.8 people per square mile (1,199.6/km²). There were 2,644 housing units at an average density of 1,299.0/sq mi (500.4/km²). The racial makeup of the borough was 87.74% White, 0.93% African American, 0.08% Native American, 8.17% Asian, 0.16% Pacific Islander, 1.64% from other races, and 1.28% from two or more races. Hispanic or Latino of any race were 8.41% of the population.
There were 2,556 households out of which 30.1% had children under the age of 18 living with them, 51.0% were married couples living together, 10.0% had a female householder with no husband present, and 34.6% were non-families. 29.0% of all households were made up of individuals and 11.9% had someone living alone who was 65 years of age or older. The average household size was 2.48 and the average family size was 3.08.
In the borough the population was spread out with 22.3% under the age of 18, 6.5% from 18 to 24, 35.0% from 25 to 44, 20.0% from 45 to 64, and 16.2% who were 65 years of age or older. The median age was 38 years. For every 100 females there were 92.3 males. For every 100 females age 18 and over, there were 91.1 males.
The median income for a household in the borough was $51,122, and the median income for a family was $59,962. Males had a median income of $46,071 versus $35,704 for females. The per capita income for the borough was $26,420. About 5.5% of families and 6.4% of the population were below the poverty line, including 6.0% of those under age 18 and 12.8% of those age 65 or over.
The Raritan train station offers New Jersey Transit service on the Raritan Valley Line. The station is north of the town center on Thompson Street. The station building is south of the tracks in the main parking lot and was built in the early 1890s. There are also three other small lots for this station. Raritan is the last station to the west that is serviced by all Raritan Valley Line trains.