Salem includes the Salem Maritime National Historic Site, the only remaining intact waterfront from the US age of sail. In 1790, Salem was the sixth largest city in the country.
According to the United States Census Bureau, the city has a total area of 46.8 km² (18.1 mi²). 21.0 km² (8.1 mi²) of it is land and 25.8 km² (9.9 mi²) of it is water. The total area is 55.09% water.
As of the census of 2000, there are 40,407 people, 17,492 households, and 9,708 families residing in the city. The population density is 1,926.1/km² (4,986.0/mi²). There are 18,175 housing units at an average density of 866.3/km² (2,242.7/mi²). The racial makeup of the city is 85.37% White, 3.15% African American, 0.22% Native American, 2.00% Asian, 0.05% Pacific Islander, 6.74% from other races, and 2.47% from two or more races. 11.24% of the population are Hispanic or Latino of any race.
There are 17,492 households out of which 24.2% have children under the age of 18 living with them, 38.8% are married couples living together, 13.3% have a female householder with no husband present, and 44.5% are non-families. 34.9% of all households are made up of individuals and 11.5% have someone living alone who is 65 years of age or older. The average household size is 2.24 and the average family size is 2.95.
In the city the population is spread out with 20.2% under the age of 18, 10.4% from 18 to 24, 33.4% from 25 to 44, 21.9% from 45 to 64, and 14.1% who are 65 years of age or older. The median age is 36 years. For every 100 females there are 86.5 males. For every 100 females age 18 and over, there are 83.5 males.
The median income for a household in the city is $44,033, and the median income for a family is $55,635. Males have a median income of $38,563 versus $31,374 for females. The per capita income for the city is $23,857. 9.7% of the population and 6.3% of families are below the poverty line. Out of the total people living in poverty, 12.2% are under the age of 18 and 7.9% are 65 or older.