2020 census
As of the 2020 census, Mecca had a population of 8,219 and a population density of 1,181.1 inhabitants per square mile (456.0/km2). The median age was 26.6 years. 34.7% of residents were under the age of 18, 12.8% were aged 18 to 24, 26.3% were aged 25 to 44, 20.1% were aged 45 to 64, and 6.0% were 65 years of age or older. For every 100 females there were 106.9 males, and for every 100 females age 18 and over there were 104.7 males age 18 and over.
83.6% of residents lived in urban areas, while 16.4% lived in rural areas. The census reported that 99.8% of the population lived in households, 15 people (0.2%) lived in non-institutionalized group quarters, and no one was institutionalized.
There were 1,895 households in Mecca, of which 62.4% had children under the age of 18 living in them. Of all households, 61.5% were married-couple households, 6.0% were cohabiting couple households, 13.4% were households with a male householder and no spouse or partner present, and 19.1% were households with a female householder and no spouse or partner present. About 7.7% of all households were made up of individuals, and 2.3% had someone living alone who was 65 years of age or older. The average household size was 4.33. There were 1,674 families (88.3% of all households).
There were 2,001 housing units at an average density of 287.5 units per square mile (111.0 units/km2). Of the units, 5.3% were vacant and 94.7% were occupied. The homeowner vacancy rate was 0.5% and the rental vacancy rate was 3.2%. Among occupied units, 44.2% were owner-occupied and 55.8% were occupied by renters.