In this study, we have investigated the oxygen isotope compositions (δ17O and δ18O) of modern rain and ice cores using published isotopic data. We find that, contrary to existing interpretations, precipitation δ17O is influenced by two factors: mass-dependent fractionation (MDF), which occurs during ocean evaporation, and mass-independent fractionation (MIF), which happens in the stratosphere. The MDF contribution remains constant and can be understood by studying tropical rain, as the overall movement of mass in the tropics is upward toward the stratosphere. On the other hand, the MIF effect comes from the mixing of stratospheric air in the troposphere, which is a result of the Brewer–Dobson circulation. This MIF effect on precipitation 17O increases from the tropics toward the poles and is observed consistently in modern precipitation and ice cores. The relative δ17O and δ18O composition, denoted as ∆‘17O, in modern precipitation can be calibrated with surface air temperature, creating a new and independent tool for estimating past temperatures. We used this calibration along with the ∆‘17O of Antarctic and Greenland ice cores, and our reconstructed past temperatures are in excellent agreement with those derived from borehole thermometry or gas phase analysis of air trapped in the ice. The ∆‘17O method overcomes the problems associated with using δ18O alone for paleothermometry. Our findings align with climate models that suggest a weakening of the Brewer–Dobson circulation during the Last Glacial Maximum. Furthermore, our approach could be used to monitor future changes in stratosphere–troposphere mass exchange in response to a warming climate caused by increasing greenhouse gases.