Materials such as zeolites, carbon molecular sieves, and polymers are used increasingly in the separation of air, based on the difference in diffusion rate between oxygen and nitrogen through the material. The design of improved materials requires knowledge of the molecular-level phenomena responsible for the separation, particularly relative roles of energetic and entropic (confinement) effects. This issue is difficult to resolve experimentally, as evidenced by the wide range in reported literature values reviewed here. A complementary approach is taken based on a combination of molecular modeling, statistical mechanics, and transition-state theory. Selectivities for molecular models of oxygen and nitrogen in microporous structures are calculated using a Monte Carlo technique and resolved into entropic and energetic components, for a range of pore window sizes. Atomic-level flexibility (vibration) is considered as well. The calculated entropic selectivities are significantly lower than reported theoretical results, but still consistent with experimental data. The energetic selectivity is very sensitive to the window dimensions and flexibility, but the entropic contribution is much less affected. This also contradicts some previous assumptions in the literature.