A closed-system model is used for predicting the ??18O of formation waters in the deep portions of the northern Green River basin, Wyoming. ??18Ocalcite is calculated from this modeled water and compared with the ??18O of measured calcites to help interpret diagenesis in the basin. The modification of ??18Owater which may be caused by diagenetic reactions at elevated temperatures, is modeled from two mass-balance equations. Three diagenetic reactions used to modify ??18Owater include: detrital limestone???calcite cement; detrital quartz???quartz cement; and detrital clay???authigenic illite/smectite. A weighted average ??18Owater and ??18O of calcite, quartz and illite/smectite in equilibrium with this water are calculated at 500-m increments. For a closed-system model, calculated variables at one depth are used for input variables at the next depth. An open system can be crudely simulated by adjusting the input variables at each depth. Petrographic and hydrologic data suggest that throughout much of the basin an open hydrochemical system overlies a relatively closed system which is below 3000 m. From the surface to 3000 m deep, ??18Ocalcite measured in sandstone cements deviates from calculated ??18Ocalcite for the closed-system model. Below 3000 m, ??18Ocalcite of cement and bulk shale converge from opposite directions with increasing depth toward the calculated ??18Ocalcite. Adjusting the calculated ??18Ocalcite to match the measured ??18Ocalcite indicates that the deviation above 3000 m results from mixing of meteoric waters with 18O-rich formation water. ?? 1987.