2020 census As of the
2020 census, Lanark had a population of 1,504, with 620 households and 433 families residing in the city. The population density was , and there were 696 housing units at an average density of . The median age was 42.1 years. 24.6% of residents were under the age of 18 and 19.3% were 65 years of age or older. For every 100 females, there were 98.4 males, and for every 100 females age 18 and over, there were 96.9 males. There were 620 households in Lanark, of which 28.5% had children under the age of 18 living in them. Of all households, 50.5% were married-couple households, 16.8% were households with a male householder and no spouse or partner present, and 26.3% were households with a female householder and no spouse or partner present. About 29.2% of all households were made up of individuals and 15.2% had someone living alone who was 65 years of age or older. The average household size was 2.77 and the average family size was 2.32. There were 696 housing units, of which 10.9% were vacant. The homeowner vacancy rate was 3.9% and the rental vacancy rate was 12.4%.
Income and poverty The median income for a household in the city was $47,917, and the median income for a family was $77,614. Males had a median income of $41,146 versus $23,354 for females. The
per capita income for the city was $29,028. About 11.3% of families and 15.5% of the population were below the
poverty line, including 22.7% of those under age 18 and 6.5% of those age 65 or over. ==Education==