For roughly 15 years, computer science was treated as one of the safest bets a college-bound student could make — a major with strong job prospects, high starting salaries, and a straightforward path from classroom to career. That streak has now ended. According to a new study by Stanford University economist Jacob Light, the share of students majoring in computer science declined during the 2025-26 academic year for the first time in about two decades, breaking a long stretch of rapid growth that began around 2008.

The scale of that earlier growth helps explain why the reversal is drawing so much attention. Between 2008 and 2024, the number of four-year computer science degrees awarded in the US increased roughly fivefold, according to the Washington Post’s analysis of National Center for Education Statistics data, outpacing growth in other well-paid fields like nursing and mechanical engineering over the same period.

What the Data Actually Shows

Light’s study, which analyzed more than 50 million course sections offered since 1996 across 1,019 US colleges and universities, found the decline in computer science’s share of overall enrollment — the study didn’t quantify the exact size of the drop. Separate data from the National Student Clearinghouse Research Center offers a clearer number: undergraduate enrollment in computer and information science programs at four-year institutions fell 8.1% in the 2025-26 school year, the steepest one-year decline of any major tracked since at least 2020. More than 60% of universities surveyed by the Computing Research Association also reported a decrease in computer science enrollment.

The pattern isn’t uniform everywhere. The University of California system saw computer science enrollment drop 6% in 2025, but UC San Diego — the only UC campus with a dedicated AI major — was the only one to see enrollment increase, with roughly 20% of the computer science department’s applications going specifically to the AI program.

Is AI Really to Blame?

The timing lines up closely with the rise of generative AI tools capable of writing functional code, and most coverage of the decline points to AI as the likely driver. But Light, the Stanford economist behind the study, has been notably cautious about drawing that conclusion directly, telling reporters the available data can’t cleanly separate AI’s effect from other contributing factors, including a broader wave of tech industry layoffs — more than 120,000 tech jobs were cut in 2026 alone, according to tracking firm Layoffs.fyi, with a significant share at large companies ramping up AI spending elsewhere in their operations.

Computer science has also historically been a boom-and-bust major well before AI entered the picture, and enrollment today remains above where it stood in 2022, adding further reason for caution before treating this as a permanent structural shift rather than a normal correction after an unusually long growth cycle.

Where Students Are Heading Instead

Rather than abandoning technology-adjacent fields altogether, many students appear to be redirecting toward more specialized alternatives. Dedicated AI majors have expanded rapidly since Carnegie Mellon University launched the first AI bachelor’s degree in 2018, with schools including MIT, the University of Pennsylvania, and Purdue now offering similar programs, and Northwestern, Columbia, and USC launching new AI-focused degrees this fall. At the University of South Florida, nearly 3,000 students have enrolled in a new college combining undergraduate programs across artificial intelligence, cybersecurity, and other computing disciplines. Other students are shifting toward engineering and the skilled trades entirely, according to reporting on the trend.

Career experts caution against reading too much into the CS-versus-AI-major distinction, however. Google DeepMind’s chief has argued that a solid STEM foundation still makes graduates far more effective at working with AI regardless of the specific degree title, and Light himself agrees many computer science graduates will continue to find real value in the degree — the underlying skills, not the major’s name, are what tend to transfer.

What This Means for Students Choosing a Major

For high school students and their families weighing a computer science degree right now, the honest takeaway is that nobody, including the researchers studying this shift closely, can say with confidence how AI will reshape entry-level tech hiring by the time today’s students graduate. What does seem clear from the data is that employers are increasingly valuing candidates who can work alongside AI tools rather than compete against them for the same routine coding tasks — which argues for treating a computer science degree as a strong technical foundation to build on with AI fluency, rather than a guaranteed credential on its own.