As of the census of 2010, there were 3,782 people, 1,390 households, and 1007 families residing in the town. The population density was . There were 1,250 housing units at an average density of . The racial makeup of the town was 95% White, 1.4% Black or African American, 0.6% Native American, 0.2% Asian, 1.1% from other races, and 1.7% from two or more races. Hispanic or Latino of any race were 3.2% of the population.
There were 1,390 households, out of which 31.2% had children under the age of 18 living with them, 56.6% were married couples living together, 10.5% had a female householder with no husband present, and 27.6% were non-families. 22% of all households were made up of individuals, and 10.2% had someone living alone who was 65 years of age or older. The average household size was 2.70 and the average family size was 3.14.
In the town, the population was spread out, with 27.8% under the age of 19, 6.1% from 20 to 24, 25.2% from 25 to 44, 28% from 45 to 64, and 12.9% who were 65 years of age or older. The median age was 38.7 years. For every 100 females, there were 95.6 males.
The median income for a household in the town was $49,023. Males had a median income of $32,355 versus $23,403 for females. The per capita income for the town was $22,174. About 9.1% of the population were below the poverty line.
Communities and locations in the Town of Oakfield
- Dunhams Grove – A former location in the town, where Lewiston Road crosses Oakfield-Batavia Townline Road.
- East Oakfield – A hamlet on the Lockport Road east of the village of Oakfield.
- Five Corners (previously "Oakfield Corners") – A location northwest of the village of Oakfield.
- Oak Orchard Wildlife Management Area – A conservation area in the north part of the town.
- Oakfield (named at first "Plain Brook," then "Caryville" until 1858) – The village of Oakfield, located on NY-63.
