In years with hotter weather pupils are likely to perform less well in exams, says a major study from researchers at Harvard and other US universities.
There is a "significant" link between higher temperatures and lower school achievement, say economic researchers.
An analysis of test scores of 10 million US secondary school students over 13 years shows hot weather has a negative impact on results.
The study says a practical response could be to use more air conditioning.
Heat wave
Students taking exams in a summer heat wave might have always complained that they were hampered by the sweltering weather.
But this study, from academics at Harvard, the University of California Los Angeles (UCLA) and Georgia State University, claims to have produced the first clear evidence showing that when temperatures go up, school performance goes down.
Researchers have tracked how secondary school students performed in tests in different years, between 2001 and 2014, across the different climates and weather patterns within the US.
The study, published by the US National Bureau of Economic Research, found that students were more likely to have lower scores in years with higher temperatures and better results in cooler years.
7 Simple tips and tricks to help you prepare for entrance exam...
This applied across the many different types of climate - whether in cooler northern US states or in the southern states where temperatures are typically much higher.
The study, Heat and Learning, suggested that hotter weather made it harder to study in lessons in school and to concentrate on homework out of school.
Researchers calculated that for every 0.55C increase in average temperature over the year, there was a 1% fall in learning.
Colder days did not seem to damage achievement - but the negative impact began to be measurable as temperatures rose above 21C.
The reduction in learning accelerated once temperatures rose above 32C and even more so above 38C.
Turning up the air conditioning
The study also found the impact of the heat was much greater on low income families and students from ethnic minorities.
There were suggestions that wealthier families and schools in disadvantaged areas were more likely to intervene if pupils were slipping behind and to find ways to compensate, such as extra tuition.
But it says a "simpler explanation" might be greater access to air conditioning in more affluent families and the schools their children attend.
Joshua Goodman, associate professor at the Harvard Kennedy School of Government, and his co-authors provide evidence that the "heat's disruption of instruction or homework time is responsible for the observed drop in test scores".
He says students were incrementally more likely to be "distracted, agitated and find it harder to focus".
But Mr Goodman says it would have been harder to carry out similar studies in the education systems in the UK, because the differences in weather conditions would have been much narrower.
The wide range of weather conditions in the US allows comparisons within the same year group as well as with test performances in previous years.
Mr Goodman says the findings also raise bigger questions about whether climate change and global warming will have implications for school achievement.
The study also asks whether heat plays a part in the huge regional differences in achievement within the US.
Northern states such as Massachusetts have very high levels of achievement in international tests, such as the OECD's Pisa tests, which compare teenagers' ability in reading, maths and science.
But southern states such as Alabama and Mississippi are at a level below European countries and closer to Turkey and Mexico.
The researchers also argue there are implications for the ethnic achievement gaps - with black and Hispanic students more concentrated in hotter states of the US.
"We argue that heat effects account for up to 13% of the US racial achievement gap," says the study, because of where black and Hispanic students live and because their test scores seem to be disproportionately disrupted by the changes in temperature.
Mr Goodman says the researchers also want to examine the long-term consequences of a hot year on a cohort of students.
If students happen to take important exams in a heatwave year, does that mean they are more likely to miss out on exam results and university places?
Mr Goodman says that policymakers and parents have under-estimated the significance of temperatures in schools and overheated classrooms.
"Teachers and students already know it's a problem - because they've had to live it," he said.