From loose sand to solid rock: three stages
Sandstone forms through diagenesis — the physical and chemical changes that turn loose sediment into rock after burial, well short of the heat and pressure needed for metamorphism. The process runs through three overlapping stages: compaction, where the weight of overlying sediment squeezes grains closer together and expels pore water; cementation, where minerals precipitate from pore fluid and glue grains together at their contact points; and lithification, the general term for the sediment becoming a coherent rock, which compaction and cementation jointly accomplish.
Porosity: what burial takes away
Freshly deposited, well-sorted sand starts with a porosity around 35–45% — roughly the same as randomly packed spheres in the lab. Burial compaction alone can drive this down to 25–30% within the first kilometre simply by grains rotating and sliding into a tighter packing; below about 2–3 km, mechanical compaction gives most of its ground to chemical compaction — pressure dissolution at grain contacts, where the locally elevated stress at a touching point dissolves quartz faster there than on the free grain surface, letting grains interpenetrate. The remaining pore space is then progressively filled by cement, and porosity in a mature, deeply buried sandstone can fall below 10%.
φ(z) ≈ φ₀ · exp(-c · z) Athy's law: exponential porosity decline with depth z φ₀ ≈ 40% (initial), c ≈ 0.3-0.6 per km (typical compaction constants)
Cementation: what precipitation adds back as strength
The cements that weld sand grains together are dissolved minerals carried in by pore fluid and precipitated onto grain surfaces as the fluid's chemistry or temperature shifts. Quartz cement, silica precipitated from pore water supersaturated by pressure dissolution elsewhere in the rock, is the most common in deeply buried, quartz-rich sandstones and grows as optically continuous overgrowths on existing quartz grains. Calcite cement forms from carbonate-rich fluids and can precipitate rapidly, sometimes early enough to prevent later compaction almost entirely — sandstones cemented early by calcite can preserve near-original porosity even after deep burial. Clay cements (illite, kaolinite, chlorite) often form from the in-situ alteration of unstable grains like feldspar and volcanic rock fragments, and unlike quartz or calcite cement they tend to coat pore surfaces and throats rather than fill pores outright, which disproportionately damages permeability for a given amount of cement volume.
Grain size and sorting set the starting point
Two sediments with identical mineralogy can diagenese very differently depending on their initial texture. Well-sorted sand (grains of similar size) packs with higher initial porosity and larger, better-connected pore throats than poorly sorted sand, where fine grains fill the gaps between coarse ones from the start. Grain size itself affects surface area available for cementation — finer sand has more surface area per unit volume, so chemical cementation (which nucleates on grain surfaces) proceeds faster relative to compaction for a given amount of dissolved mineral supply, tending to preserve less porosity at a given burial depth than coarser, better-sorted sand.
Temperature drives the chemistry
Below roughly 70–80°C, chemical diagenesis is slow and mechanical compaction dominates porosity loss. Above that threshold — reached at burial depths of order 2–3 km under a typical geothermal gradient of 25–30°C/km — reaction rates for pressure dissolution and cement precipitation rise sharply, following Arrhenius kinetics, and quartz cementation in particular becomes the dominant control on remaining porosity. This is why petroleum geologists treat the 70–80°C burial history of a sandstone reservoir, not just its present depth, as the key predictor of how much porosity and permeability survived — two sandstones buried to the same depth today can differ enormously in reservoir quality if one spent much longer above that temperature threshold before being uplifted.
Permeability: porosity's less forgiving cousin
Porosity measures how much pore space remains; permeability measures how well-connected that space is, and the two do not decline in lockstep. A small amount of pore-throat-lining clay cement can crater permeability while barely denting total porosity, because fluid flow depends on the narrowest constrictions along a connected path, not on the total volume of open space. This is the practical reason sandstone reservoir quality is always reported as a porosity-permeability pair rather than either number alone — a sandstone can be simultaneously mediocre in porosity and excellent in permeability, or the reverse, depending on which cement minerals and pore geometry it inherited from its specific diagenetic history.
Frequently asked questions
What is the difference between compaction and cementation?
Compaction is purely mechanical — the weight of overlying sediment squeezes grains together and expels water, reducing pore space without adding new material. Cementation is chemical — dissolved minerals like quartz, calcite or clay precipitate from pore fluid and physically glue grains together, which is what gives sandstone its strength rather than just its density.
Why does sandstone porosity decrease with depth?
Two compounding reasons: mechanical compaction from increasing overburden weight packs grains tighter, and above roughly 70-80°C (typically 2-3 km depth) chemical processes like pressure dissolution and quartz cementation accelerate sharply, filling much of what pore space compaction left behind.
Can a deeply buried sandstone still have high porosity?
Yes, if cementation happened early and extensively enough to rigidly support the grain framework against later compaction. Sandstones cemented early by calcite, for example, can resist mechanical compaction almost entirely and preserve near-original porosity even after burial to depths that would otherwise crush an uncemented sand.
Try it live
Everything above runs in your browser — open Sandstone Formation and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Sandstone Formation simulation