Cary is a village located in Algonquin Township, McHenry County, Illinois, United States. The population was 17,965 as of 2017.