The compaction of an idealized sandstone is described quantitatively in terms of its stress/temperature history and the microstructure of its monomineralic load-bearing grain/cement framework. The model relationship is developed from simple energy and volume balance considerations. Although chemistry (mineral, pore fluid) and transport (diffusion, fluid flow) play major roles in most diagenetic processes, they do not appear explicitly in this mechanical model for grain interpenetration in sandstones. For a model sandstone at compaction equilibrium, the only quantity determined uniquely by the ambient stress and temperature is its "burial constant", equal to the ratio of its grain/cement contact diameter to the separation of its grain centers. The burial constant determines what the maximum porosity can be, whether primary or secondary. Sandstones with identical burial constants may have very different grain interpenetrations and minus-cement porosities, depending on the amount of supporting cement and the time of its emplacement. Supporting (load-bearing) cement increases the effective intergrain contact area, thereby increasing a sandstone's resistance to compaction. Supporting cement usually preserves more pore space than it occupies. This is in direr contrast to passive (non load-bearing) cement, which may destroy even more effective pore space than its solids occupy. The removal of passive cement increases porosity, but the removal of supporting cement initiates further compaction and causes porosity to decrease. With sufficient supporting cement, primary porosity can retain economic values to great depths. Model predictions are uniformly consistent with available observational data on quartzose sandstones. Agreement among data from geographically diverse sandstone reservoirs ranging in age from Jurassic to Pleistocene suggests that compaction equilibrium is reached in times that are short on the geological time scale, and that age is not a factor in the compaction of sandstones.