According to the United States Census Bureau, the city has a total area of 1.9 square miles (4.9 km²), all of it land.
As of the census of 2000, there were 8,737 people, 2,151 households, and 1,854 families residing in the city. The population density was 4,655.2 people per square mile (1,794.3/km²). There were 2,269 housing units at an average density of 1,209.0/sq mi (466.0/km²). The racial makeup of the city was 42.36% White, 0.40% African American, 1.76% Native American, 1.14% Asian, 0.03% Pacific Islander, 48.35% from other races, and 5.95% from two or more races. Hispanic or Latino of any race were 72.02% of the population.
There were 2,151 households out of which 54.8% had children under the age of 18 living with them, 61.8% were married couples living together, 16.6% had a female householder with no husband present, and 13.8% were non-families. 10.6% of all households were made up of individuals and 5.3% had someone living alone who was 65 years of age or older. The average household size was 4.05 and the average family size was 4.32.
In the city the population was spread out with 38.4% under the age of 18, 12.7% from 18 to 24, 27.9% from 25 to 44, 14.7% from 45 to 64, and 6.3% who were 65 years of age or older. The median age was 24 years. For every 100 females there were 102.8 males. For every 100 females age 18 and over, there were 102.9 males.
The median income for a household in the city was $27,682, and the median income for a family was $29,629. Males had a median income of $23,680 versus $20,699 for females. The per capita income for the city was $8,624. About 23.6% of families and 30.7% of the population were below the poverty line, including 37.3% of those under age 18 and 22.3% of those age 65 or over.
In the state legislature Farmersville is located in the 18th Senate District, represented by Republican Roy Ashburn, and in the 34th Assembly District, represented by Republican Connie Conway. Federally, Farmersville is located in California's 21st congressional district, which has a Cook PVI of R +13 and is represented by Republican Devin Nunes.