We estimate the acute effect of air pollution on cognitive performance and how the effect varies with task proficiency using data from over 25,000 individuals and 925,000 plays of a popular online arithmetic training game. To isolate exogenous pollution fluctuation, we interact spatial variation in NO_{x} emissions with thermal inversion episodes. This exogenous variation negatively affects the cognitive performance of proficient players but not of beginners. Instrumenting NO_{2} pollution with the emissions × inversion interaction, we find that a 1 part per billion concentration increase lowers the number of correct answers of proficient individuals by 0.5% and by 0.3% overall.