Computer Science Interest Turns Down Across Every Level, 2024–2026
AP exams, the UC system, elite privates, and national counts all reversed together
July 7, 2026
For two decades, computer science was the fastest-growing corner of American education. That trend has now reversed at the same moment across four independent datasets: high school AP exams, the University of California system, elite private universities, and national enrollment counts. Between 2002 and 2024, AP Computer Science A grew more than sixfold, and undergraduate CS enrollment roughly doubled over the last ten years alone. This piece lays out the numbers and the factors analysts have attached to them, without asserting which of those factors is doing the work.
High school: AP Computer Science A peaks, then falls two years running
AP Computer Science A, the exam's programming-heavy track, 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. The 2026 count is down about 17% from the 2024 peak, erasing roughly three years of growth and returning the exam to its 2022–2023 range. Enrollment in the other major lab sciences, by contrast, has kept climbing.
AP Computer Science A Test Takers
2002–2026 · 2026 preliminary · decline from the 2024 peak in red
The 2026 count (~81,500) is down about 17% from the 2024 peak of 98,136, returning the exam to its 2022–2023 range. Source: College Board.
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. By 2026, Biology and Chemistry are up about 22% and Physics 1 about 12%, while CS A is down about 17%.
AP Science Exams Indexed to 2024
2024 = 100 · each exam indexed to its own 2024 total · 2026 preliminary
By 2026, Biology and Chemistry are up about 22% and Physics 1 about 12%, while CS A is down about 17%. Source: College Board.
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.
AP CS A vs. CS Principles Test Takers
2022–2026 · 2026 preliminary
Both peaked in 2024. CS Principles held roughly flat through 2025 before dipping; CS A fell in both 2025 and 2026, about 2.5x faster off the peak. Source: College Board.
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 bucked 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.
CS Enrollment Declines by Source
Percent change · measurement window noted per bar
Windows differ: AP is a two-year change from the 2024 peak; UC is a two-year change; National Student Clearinghouse and Goldman figures are single-year (fall 2025 / 2025–26).
Where the students are going, and why
The retreat is concentrated in traditional CS. Adjacent fields — 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 within computing rather than away from it. Sources covering the decline cite a recurring set of conditions, listed here as co-occurring variables, not established causes:
- 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.
- 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.
Which of these is decisive, and in what mix, is not something the enrollment data alone can settle.
Key Takeaways
- AP CS A test takers fell ~17% from the 2024 peak (98,136 → ~81,500), erasing roughly three years of growth
- AP Biology and Chemistry grew ~22% and Physics 1 ~12% over the same two years — CS A fell while every other lab science rose
- The rigorous CS A track is shrinking ~2.5x faster than the conceptual CS Principles course
- UC CS majors are down 9% over two years — the first sustained decline since the dot-com bust
- National Student Clearinghouse: CS enrollment down 11.2% in fall 2025, the steepest drop of any field
- Adjacent fields (AI, data science, cybersecurity, computer engineering) are flat or growing — much of the shift is within computing, not away from it
- The turn lines up with the arrival of generative AI coding tools, but the data alone can't settle which factor is decisive
Sources
- College Board — AP Computer Science A score distributions
- College Board — AP Computer Science Principles score distributions
- AP Program — Trevor Packer, 2026 AP CSA results
- University of California — Freshman admission by discipline
- San Francisco Chronicle (via GovTech) — UC CS majors decline
- Princeton Alumni Weekly — Computer science majors decline
- Built In — CS degrees losing popularity (NSC, MIT AI major)
- Goldman Sachs (via Yahoo Finance) — Students ditching computer science
- Computing Research Association — 2025 Taulbee Survey
- Computing Research Association — CERP enrollment pulse survey
Figures for 2026 AP exams are preliminary. UC year-over-year figures are as reported by the San Francisco Chronicle.