It’s well known that sitting at a desk all day isn’t a great idea. Now it turns out that, in most offices, breathing isn’t either. Especially if you work in a building where you can’t open a window, the air around you could be a drag on productivity, decreasing your decision-making skills by 50% or more.

The culprit is carbon dioxide, according to a series of studies since 2012. The most recent research, led by Joseph Allen, who teaches at Harvard’s T.H. Chan School of Public Health, analyzed the performance of knowledge workers, including engineers, programmers, creative marketing professionals, and managers. For several hours each day, unbeknownst to those employees, the researchers raised and lowered the amount of carbon dioxide in the air, and then tested everyone on nine different kinds of cognitive ability, like responding to a crisis, strategic thinking, and applying their knowledge to a practical task.

The higher the concentration of CO2, the lower the test scores. Even allowing for uncontrolled factors such as diet, previous night sleep quality, and mood, employees’ overall sharpness fell by an average of 15% when CO2 levels reached “moderate” levels of about 945 parts per million (ppm). In modern office buildings, designed to maximize energy efficiency by letting in as little outside air as possible, CO2 levels around 1,000 ppm are common.

However, mainly because until recently carbon dioxide was thought to be harmless, the buildup of CO2 is often even higher. That’s not good. At 1,400 ppm, for instance, the test subjects’ performance dropped by 50% on average, and in some cases by much more. When they were breathing well-ventilated air, with roughly the same low CO2 content as in a “green” building, the employees were 172% better at applying knowledge to a problem, and 97% more effective at responding to a crisis.

Curious about the air where you work? Allen notes that there are lots of consumer-friendly carbon dioxide detectors on the market, adding that the research found that people performed best at CO2 levels of 500-600 ppm. If your office is approaching 1,000 ppm, he says, “I would recommend talking with your facilities manager and your employer” about adjusting the ventilation system.

“It’s never a bad idea to get up from your desk for a walk and some fresh air,” Allen adds, “especially if there’s some green space nearby.” If it seems to you that you do your best thinking when you’re hiking, biking, or just sitting around under a tree, you may be right. Outdoor CO2 concentrations, usually at about 400 parts per million, are markedly lower than in most workspaces.