Oakfield is a town in Genesee County, New York, United States. The population was 3,250 at the 2010 census. The name of the town is derived from the number of trees, including the oak. The town is on the northern border of Genesee County. Within the town is a village also named Oakfield.