2020 census As of the
2020 census, Stanford had a population of 21,150 and a population density of . The age distribution was 4.7% under the age of 18, 36.8% aged 18 to 24, 48.5% aged 25 to 44, 6.5% aged 45 to 64, and 3.5% who were 65 years of age or older. The median age was 25.8 years. For every 100 females there were 105.3 males, and for every 100 females age 18 and over there were 105.4 males age 18 and over. There were 4,829 housing units at an average density of , of which 93.2% (4,499) were occupied; 18.2% of occupied units were owner-occupied and 81.8% were occupied by renters. The homeowner vacancy rate was 0.4% and the rental vacancy rate was 5.0%.
2010 census At the
2010 census Stanford had a population of 13,809. The population density was . The racial makeup of Stanford was 7,932 (57.4%) White, 651 (4.7%) African American, 86 (0.6%) Native American, 3,777 (27.4%) Asian, 28 (0.2%) Pacific Islander, 263 (1.9%) from
other races, and 1,072 (7.8%) from two or more races. Hispanic or Latino people of any race were 1,439 persons (10.4%). The census reported that 55.6% of the population lived in households and 44.4% lived in non-institutionalized group quarters. There were 3,913 households, 517 (13.2%) had children under the age of 18 living in them, 1,159 (29.6%) were
opposite-sex married couples living together, 47 (1.2%) had a female householder with no husband present, 24 (0.6%) had a male householder with no wife present. There were 159 (4.1%)
unmarried opposite-sex partnerships, and 15 (0.4%)
same-sex married couples or partnerships. 1,522 households (38.9%) were one person and 87 (2.2%) had someone living alone who was 65 or older. The average household size was 1.96. There were 1,230 families (31.4% of households); the average family size was 2.77. The age distribution was 917 people (6.6%) under the age of 18, 7,914 people (57.3%) aged 18 to 24, 3,595 people (26.0%) aged 25 to 44, 762 people (5.5%) aged 45 to 64, and 621 people (4.5%) who were 65 or older. The median age was 22.6 years. For every 100 females, there were 118.3 males. For every 100 females age 18 and over, there were 120.1 males. There were 3,999 housing units at an average density of 1,440.6 per square mile, of the occupied units 790 (20.2%) were owner-occupied and 3,123 (79.8%) were rented. The homeowner vacancy rate was 0.9%; the rental vacancy rate was 0.9%. 2,022 people (14.6% of the population) lived in owner-occupied housing units and 5,657 people (41.0%) lived in rental housing units.
Income In 2023, the US Census Bureau estimated that the median household income was $70,651, and the
per capita income was $42,003. About 7.0% of families and 18.2% of the population were below the poverty line. ==Politics==