 According to the United States Census Bureau, McGregor has a total area of , all of it land.As of the census of 2000, 4,727 people, 1,728 households, and 1,206 families resided in the city.The population density was 216.7 people per square mile (83.6/km²).