The percentage of a rock or sedimentary deposit that consists of voids and open space is its
porosity—the greater its porosity, the greater its ability to hold water. Sediments are usually more porous than rocks. Sedimentary rocks tend to be more porous than igneous rocks because there is more open space between the individual sediment grains than between the minerals in a crystallized rock. The porosity of loose sand is about 40 percent; compacting and dewatering the sand reduces the porosity to about 15 percent; the lithification of the sand into a sandstone rock by formation of cement between the sand grains reduces the porosity to about 5 percent or less.
Open space in fractures is also considered part of a rock's porosity. An igneous rock that is jointed, fractured, or shattered can hold as much water in its cracks as sedimentary rocks can hold between their grains.