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.
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.
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.
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.
Views from the public
Ananas Kumar in India: Weather always affects the result of an exam. Having experienced both summer and winter exams I can say that summer affects your performance more due to hot temperatures, dehydration and sunstroke.
John Hammond: As a retired teacher, I don't think this is news at all. The simple fact is that it is little to do with the actual exams and far more to do with the weather in the run up to the exams and this starts as soon as Easter. I taught in a school on the south coast and we dreaded a good Easter because the pupils all went to the beach to revise rather than stay at home and doing it properly. The study should have concentrated on the IQs of the kids involved; usually the brighter ones were more capable of resisting the pull of the beach.
Haidab Hany in Ghana: I would like to challenge the Harvard research that heat-waves affect students during exams. I live in Ghana which is a tropical country. We have very hot weather from December to April and students in schools all over the country write exams and do well. Some pupils of course don't do well, but that's not due to the heat just poor preparation. I've studied in Ghana and during heat waves and had no issues.
Afbell: As someone who took O-levels and A-levels more than 40 years ago, I have known this for over 40 years! I personally had the double whammy of suffering from hay-fever so had to put up with warm weather and the accompanying high pollen count. Antihistamines were considerably less effective in the mid-70s so I just had to suffer. My recollection of this period also includes trying to revise during very hot weather. This was actually worse than the exams; exams had a finish time, revising seemed to be endless in the heat.
Joe Field: I have been teaching since 1972, I have no doubt that test results during a heat-wave are lower than in cooler weather. Learning in general is worse during a heat wave. This appears to be one reason for the long summer school holidays in the UK, US and elsewhere.
The editor of Global education is email@example.com