A mathematically simple kinetic model simulates quartz cementation and the resulting porosity loss in quartzose sandstones as a function of temperature history. Dissolved silica is considered to be sourced from quartz dissolution at stylolites or individual quartz grain contacts containing clay or mica, and diffuses short distances to sites of precipitation on clean quartz surfaces. The modeled sandstone volume is located between stylolites, and no quartz dissolution or grain interpenetration takes place within this volume. After quartz cementation starts, compactional porosity loss is typically minor, and porosity loss within the modeled sandstone volume is therefore considered to be equal to the volume of precipitated quartz cement. The quartz cementation process is modeled as a precipitation rate-controlled reaction where quartz precipitation rate per unit time and surface area can be expressed by an empirically determined logarithmic function of temperature. When the sandstone's temperature history is known, precipitation rate per unit time and surface area can be expressed as a function of time, and the amount of quartz cement precipitated within a certain time interval can be calculated by multiplying the precipitation rate function with the surface area available for quartz precipitation and integrating with respect to time. Because quartz surface area will change as quartz cement precipitation proceeds, the calculations are performed for short time steps, and quartz surface area is adjusted after each time step. The total amount of quartz cement precipitated during a sandstone's burial history and the corresponding porosity loss are found by taking the sum of the increments of quartz cement precipitated during each time step. The effect of variation in parameters such as grain size, detrital quartz content, abundance of clay or other grain coatings, prequartz cementation porosities, and temperature history is easily simulated with the presented algorithm. This flexibility is illustrated by presenting calculated histories of quartz cementation and porosity loss for sandstones with a range of grain sizes, framework grain compositions, degree of clay coat development, prequartz cementation porosities, and temperature histories.