More than 220 students in a class of about 1,700 chose to major in computer science a 25 percent leap from the previous record in 2000-01.
Though computer-science enrollments are up nationwide, Stanford is outpacing the broader trend, according to a recent report from the Stanford School of Engineering.
In the most recent spring term, computer science had more majors than human biology long the most popular major at the university.
The computer-science bump at Stanford follows a major restructuring of the program over the past several years, overseen by the department's Associate Chair for Education Mehran Sahami, a former research scientist at Google.
The goal was to cast a wider net, allowing computer-science students to see how their skills could be applied in a variety of fields.
The previous core curriculum, described in the engineering report as "monolithic and inflexible," was pared down to just six core courses, three with a theoretical focus and three with an emphasis on programming and systems.
The six courses provide a foundation that is built upon in a series of tracks that students can choose from in order to focus on their greatest personal interest. Among the tracks are artificial intelligence, systems, theory, graphics and human-computer interaction.
A number of courses from other departments including biology, psychology, product design and studio art can be included as part of a student's program in computer science.
"Virtually every field is touched by computer science in some way," Sahami told the Engineering Report.
"In medicine and biology computational methods are used to analyze DNA, predict treatment outcomes and model drugs at a molecular level. In environmental sciences, there is need for climate modeling. In investing and finance, algorithmic approaches are widely used.
"Computers have dramatically changed animation, and artists with knowledge of computers are increasingly in demand. Conversely, computer scientists studying graphics need an appreciation for art. After all, a bad picture, even one in high resolution, is still a bad picture," Sahami said.