For two decades, computer science was the fastest-growing sector of education. That trend has now reversed at the same moment across four independent measures: AP exams, the University of California system, elite universities, and national enrollment counts.
Between 2002 and 2024, AP Computer Science A test takers grew more than sixfold, and undergraduate CS enrollment roughly doubled over the last ten years alone.
AP CS A peaks, then falls for two straight years
AP Computer Science A grew almost every year from 15,660 test takers in 2002 to a peak of 98,136 in 2024. It has fallen in each of the two years since. Enrollment in the other major lab sciences, by contrast, has kept climbing.
Meanwhile, the lab sciences kept climbing
The decline is more striking because it runs against CS A’s own field. Over the same two years, AP Biology, Chemistry, and Physics 1 each grew by double digits. Some of that is a rising tide, as overall AP participation grew about 7% from 2024 to 2025, but CS A fell while the other sciences rose, making it one of the few STEM exams to shrink at all.
The AP CSA vs. CSP split
The decline is sharper in the rigorous programming course than in the conceptual one. AP Computer Science Principles, the broader survey course that does not require Java, drew 175,261 test takers in 2024 and about 163,000 in 2026, a drop of roughly 7%. Over the same window, AP CSA fell about 17%, roughly two and a half times faster. Interest in serious coding is cooling faster than interest in general computing literacy.
University of California: first sustained decline since the dot-com bust
UC-wide, 12,652 undergraduates are majoring in computer science in 2025, down 6% from 2024 on top of a 3% drop the year before, a 9% decline over two years and the first sustained retreat since the early-2000s dot-com bust. The total is back to roughly its 2021 level, though still nearly double where it stood a decade ago.
One campus broke the trend: UC San Diego, the only UC with a dedicated undergraduate AI major, where about one in five applications to the CS department now target that AI track.
Elite private universities: the same shape
Princeton: Computer science was the single most popular major from 2011 through 2017 and held that rank through the Class of 2025. Fewer students are now declaring it, while electrical and computer engineering rises.
Stanford: CS enrollment has stalled after years of steady growth.
MIT: The “Artificial Intelligence and Decision Making” major, launched in 2022, is now the second-largest major on campus at roughly 330 students, behind only CS.
National context
Separate national counts confirm the pattern, and it is the steepest move in computing enrollment in years.
The National Student Clearinghouse reports computer and information science enrollment fell 8.1% in fall 2025, the steepest drop of any field of study, with computer science specifically down 11.2%.
Goldman Sachs found CS and programming enrollment each fell more than 10% in 2025–26, which it framed as the first clear evidence students are steering away from majors exposed to AI.
Individual campuses show the same: Arizona State CS down about 14% between fall 2024 and fall 2025; Washington University in St. Louis down 16% over two years.
Where the students are going, and why
The reduction is concentrated in traditional CS. Adjacent fields, including data science, cybersecurity, computer engineering, and dedicated AI programs like UC San Diego’s and MIT’s, are flat or growing, so much of this is movement is still within computing rather than away from it. Sources covering the decline cite a recurring set of conditions:
Tech-sector layoffs (more than 100,000 in 2025, following larger cuts in 2024).
AI coding tools reshaping entry-level software work and the perceived demand for junior developers declining
A tougher early-career job market, with recent-graduate unemployment above the national rate for five straight years
Migration toward specialized AI, cybersecurity, data science, and computer engineering degrees.
The clearest signal yet
High school interest, declared majors at public and private universities, and national enrollment are separate measures counted by separate institutions, and all of them turned down together after a decade or more of growth. That turn lines up with the arrival of generative AI coding tools. It is the clearest signal so far that the GenAI era is changing how many students choose to study computing. Whether it holds, and how far it runs, is the open question, and I’ll keep tracking new data releases for it. Thanks for reading!
Sources:






Great analysis Neev! Since you looked at Trevor Packer's AP data, do you think the drop in AP CSA is showing a shift where mostly students with a genuine, intrinsic passion for software are applying for CS, unlike the past decade where many applied purely for the ‘gold rush’ of high salaries?