Students from Gale Ranch Middle School in San Ramon won second place and students from Hopkins Junior High School in Fremont took third place, according to the U.S. Department of Energy.
A high school team from Durham, N.C., and a middle school team from Alburquerque, N.M., won first place.
During the competition, students were quizzed in a fast-paced, question-and-answer format designed to test their knowledge in science and math.
First Lady Michelle Obama asked bonus questions today in the championship middle school match.
Members of the top three middle school teams will each receive an Nspire calculator provided by Texas Instruments. The teams also won a Texas Instruments Computer-Based Laboratories/2, a hand-held data gathering device.
The top 16 high school and eight middle school teams will take home a $1,000 cash prize for their school science departments. Those winners included teams from Lynbrook High School in San Jose and Palo Alto High School in Palo Alto.
The Department of Energy began hosting the annual National Science Bowl in 1991 to encourage high school students to excel in science and math and to pursue careers in those fields, according to the department.
More than 200,000 students have participated in the National Science Bowl over the past 20 years, according to the department.