As of the census of 2000, there were 45,793 people, 19,704 households, and 11,822 families residing in the city. Pittsfield is the largest city by population in Berkshire County, and ranks 27th out of the 351 cities and towns in Massachusetts. The population density was 1,124.3 people per square mile (434.1/km), making it the most densely populated community in Berkshire county and 92nd overall in the Commonwealth. There were 21,366 housing units at an average density of 524.6 per square mile (202.5/km).