Computer science enrollment fell for the first time in 20 years after ChatGPT’s rise, a Stanford economist says
Thibault Spirlet
Tue, July 21, 2026 at 6:09 AM PDT 3 min read
A Stanford economist says computer science enrollment fell for the first time in roughly two decades.
Jacob Light’s study links the slowdown to AI’s rise, but stops short of saying ChatGPT caused it.
National data also show computer science enrollment fell in 2025 after years of rapid growth.
The explosive rise of ChatGPT may coincide with a turning point for one of America’s fastest-growing college subjects.
Computer science enrollment declined during the 2025-26 academic year for the first time in roughly two decades, according to new research by Jacob Light, an economist at Stanford University’s Hoover Institution.
While the study doesn’t estimate the size of the drop, separate National Student Clearinghouse Research Center data 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 timing overlaps with the rapid adoption of generative AI, but Light cautioned that the data does not show artificial intelligence caused the decline.
Using a dataset covering more than 50 million course sections offered since 1996 across 1,019 US colleges and universities, Light tracked long-term enrollment patterns alongside the growing capabilities of large language models.
“The most notable recent development is the flattening and reversal in the Computer Science enrollment share trend,” Light wrote. “In 2025-26, Computer Science enrollment share declined for the first time in roughly two decades, interrupting a period of sustained and unusually rapid growth.”
‘Descriptive’ rather than ‘causal’ effect of AI
Computer science had enjoyed years of booming popularity as demand for software engineers and other tech workers surged.
The number of bachelor’s degrees awarded in computer and information sciences more than doubled over the past decade, rising from about 56,000 in 2014 to about 122,000 in 2024, according to data from the National Science Foundation’s National Center for Science and Engineering Statistics.
But the arrival of AI assistants capable of writing code, debugging programs, and completing technical assignments has sparked debate about whether the field’s value proposition is changing.
Light said several explanations could account for the enrollment drop.
“The decline could reflect changes in the education production function as generative AI alters how students complete coursework, changes in students’ expectations about the returns to Computer Science skills, responses to labor market conditions that themselves partly reflect AI adoption, broader weakness in the technology labor market unrelated to AI, or other contemporaneous shifts in student demand,” he wrote.
Story Continues