The "battle of the thermostat" may have a real effect on workers' productivity, and women benefit when offices are warmer, a new study found.

Researchers tracked the performance of more than 500 men and women in Germany on cognitive tasks when room temperatures varied from roughly 60 to 90 degrees Fahrenheit and found that women generally performed better in warmer temperatures and men in colder ones.

"There have been many studies showing that women prefer higher indoor temperatures than men, however nobody looked at the effect of these differences in comfort on performance. We show that the battle for the thermostat is not just about the comfort. It is much more," study author Agne Kajackaite wrote in an email to USA TODAY.

The research was published Wednesday in the peer-reviewed PLoS ONE online journal by researchers from the University of Southern California's Marshall School of Business and WZB Berlin Social Science Center.

Opinion:Thanks, air conditioning. It's blistering hot outside, but at work, women are freezing

In a laboratory experiment of 543 students in Berlin, participants were asked to do math problems without a calculator, write as many words as possible given a string of random letters and answer questions in a "cognitive reflection test."

On the math and verbal sections, women performed best at higher temperatures and men performed best at lower temperatures, though the results for men were less pronounced. Researchers found no relationship between temperature and the results on the cognitive reflection section.

Looking specifically at math, the team also found the number of questions women answered correctly increased by 1.76% when temperatures were increased by 1 degree Celsius – a statistically significant finding.

However, the number of questions men answered incorrectly decreased by just 0.63% in a 1 degree warmer setting – a "generally small and statistically insignificant" finding, the researchers write.

"The effect of temperature on women is so strong. Especially, the results from the math task were surprising. At low temperatures, men clearly outperform women," Kajackaite told USA TODAY. "At high temperatures ... the gender difference disappears."

The study also found that women attempted more questions and men fewer in warmer temperatures. The authors say they believe this increase in attempted questions, which they interpret as increased effort, is likely driving more correct answers for women.

Cold at work? You're not alone. Fake thermostats, and other reasons why

The team also said the study should be used not only to show the increased productivity in warmers rooms but also for other researchers to consider how temperatures may be affecting the results in their studies that look at differences between men and women.

"Each reader can use this as a take away and be more conscious about the ambient temperature when working," Kajackaite says. "It might affect how well they will perform that day."

Follow USA TODAY's Ryan Miller on Twitter @RyanW_Miller