For years, computer science had been one of the fastest-growing college majors as demand for software engineers and other technology professionals surged.
Between 2008 and 2024, the number of four-year computer science degrees awarded in the U.S. increased roughly fivefold, outpacing growth in other high-paying fields such as nursing and mechanical engineering, The Washington Post reported, citing data from the National Center for Education Statistics.
The arrival of AI assistants that can write code, debug software and complete technical assignments has since fueled debate over whether students are rethinking the value of studying computer science.
Jacob Light, an economist at Stanford University's Hoover Institution, in his new study, analyzed more than 50 million course sections offered since 1996 across 1,019 U.S. colleges and universities. He found that the share of students majoring in computer science declined in the 2025-26 academic year for the first time in about 20 years, ending a long period of rapid growth.
![]() |
|
Computer science students at Carnegie Mellon University, U.S. Photo courtesy of the university |
While the study did not measure the size of the decline, separate data from the National Student Clearinghouse Research Center showed undergraduate enrollment in Computer and Information Sciences and Support Services at four-year colleges fell 8.1% year over year in the fall of 2025, the steepest one-year decline among all majors since at least 2020.
Although the timing coincided with the rapid adoption of generative AI, Light said the study does not show that AI caused the decline.
He said the trend could reflect several factors, including AI changing how students learn and how they assess the value of computer science skills, weaker demand in the technology job market, and broader shifts in student interests.
However, he said the available data cannot determine which factor was primarily responsible.
"Therefore, I treat the enrollment patterns as descriptive evidence rather than as an estimate of the causal effect of ChatGPT or AI exposure on student demand," Light wrote, as quoted by Business Insider.
Whether the slowdown is temporary or marks a longer-term shift in students' interest in computer science remains unclear. Light said the picture should become clearer "as additional cohorts make course and major choices."