Cary is a town in Wake, Chatham, and Durham counties in the U.S. state of North Carolina and is part of the Raleigh-Cary, NC Metropolitan Statistical Area. According to the 2020 census, its population was 174,721, making it the seventh-most populous municipality in North Carolina, and the 148th-most populous in the United States. In 2023, the town's population had increased to 180,010. Cary began as a railroad village and became known as an educational center in the late 19th and early 20th centuries. In April 1907, Cary High School became the first state-funded public high school in North Carolina. The creation of the nearby Research Triangle Park in 1959 resulted in Cary's population doubling in a few years, tripling in the 1970s, and doubling in both the 1980s and 1990s. Cary is now the location of numerous technology companies, including the world's largest privately held software company. In Cary, 68.4% of adults hold a bachelor's degree or higher, which is higher than the state average. In 2021, it was identified as the safest mid-sized place to live in the United States, based on 2019 FBI data. It also has a median household income of $113,782, higher than the county average of $88,471 or the state average of $60,516.